












技术领域technical field
本公开涉及图像处理技术领域,具体而言,涉及一种图像处理方法、装置、电子设备及计算机可读介质。The present disclosure relates to the technical field of image processing, and in particular, to an image processing method, apparatus, electronic device, and computer-readable medium.
背景技术Background technique
目前,在智能化地对图像进行色彩增强的方案中,常常需要对图像进行复杂的运算,例如基于对抗网络的图像色彩增强方案。但目前的复杂方案在应用于具有大量图像帧的视频中时,由于图像帧的数量非常大,将导致计算量增大,这一问题将对硬件设备有更高的要求,并会降低运行速度,无法满足目前视频类应用场景的图像处理需求。At present, in the scheme of intelligently enhancing the color of the image, it is often necessary to perform complex operations on the image, such as the image color enhancement scheme based on the adversarial network. However, when the current complex scheme is applied to a video with a large number of image frames, due to the very large number of image frames, the amount of calculation will increase, which will have higher requirements on hardware devices and reduce the running speed. , which cannot meet the image processing requirements of current video application scenarios.
因此,需要一种新的图像处理方法、装置、电子设备及计算机可读介质。Therefore, there is a need for a new image processing method, apparatus, electronic device and computer-readable medium.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above Background section is only for enhancement of understanding of the background of the present disclosure, and therefore may contain information that does not form the prior art that is already known to a person of ordinary skill in the art.
发明内容SUMMARY OF THE INVENTION
本公开实施例提供一种图像处理方法、装置、电子设备及计算机可读介质,进而至少在一定程度上避免相关技术中为保证色彩增强质量而采用复杂度较高的算法造成的运算效率低下的问题。Embodiments of the present disclosure provide an image processing method, apparatus, electronic device, and computer-readable medium, so as to at least to a certain extent avoid the inefficient operation caused by the use of algorithms with high complexity in the related art to ensure the quality of color enhancement. question.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Other features and advantages of the present disclosure will become apparent from the following detailed description, or be learned in part by practice of the present disclosure.
本公开实施例提出一种图像处理方法,包括:获取目标图像;获得所述目标图像中各个像素点的灰度值;根据所述目标图像中各个像素点的灰度值,获得所述目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差;根据所述目标灰度值、所述灰度均值和所述灰度标准差确定所述目标图像的目标亮度等级;根据所述目标亮度等级对所述目标图像进行色彩增强处理。An embodiment of the present disclosure provides an image processing method, including: obtaining a target image; obtaining grayscale values of each pixel in the target image; obtaining the target image according to the grayscale values of each pixel in the target image The target gray value, the gray mean value and the gray standard deviation with the largest number of pixels in the middle; determining the target brightness level of the target image according to the target gray value, the gray mean value and the gray standard deviation; Color enhancement processing is performed on the target image according to the target brightness level.
本公开实施例提出一种图像处理装置,包括:图像获取模块,配置为获取目标图像;像素灰度模块,配置为获得所述目标图像中各个像素点的灰度值;灰度统计模块,配置为根据所述目标图像中各个像素点的灰度值,获得所述目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差;亮度等级模块,配置为根据所述目标灰度值、所述灰度均值和所述灰度标准差确定所述目标图像的目标亮度等级;色彩增强模块,配置为根据所述目标亮度等级对所述目标图像进行色彩增强处理。An embodiment of the present disclosure provides an image processing apparatus, including: an image acquisition module, configured to acquire a target image; a pixel grayscale module, configured to acquire grayscale values of each pixel in the target image; a grayscale statistics module, configured In order to obtain the target gray value, gray mean value and gray standard deviation with the largest number of pixels in the target image according to the gray value of each pixel point in the target image; the brightness level module is configured to be based on the target image. The grayscale value, the grayscale mean value and the grayscale standard deviation determine the target brightness level of the target image; the color enhancement module is configured to perform color enhancement processing on the target image according to the target brightness level.
在本公开的一些示例性实施例中,亮度等级模块包括第一亮度等级单元,配置为若所述目标灰度值小于或等于第一灰度阈值,且所述灰度均值小于第一均值阈值,所述灰度标准差小于第一标准差阈值,则确定所述目标图像的目标亮度等级为第一亮度等级。In some exemplary embodiments of the present disclosure, the brightness level module includes a first brightness level unit configured to, if the target gray value is less than or equal to a first gray threshold, and the gray mean value is less than the first mean threshold , the grayscale standard deviation is smaller than the first standard deviation threshold, and the target brightness level of the target image is determined to be the first brightness level.
在本公开的一些示例性实施例中,亮度等级模块还包括第二亮度等级单元,可配置若所述目标灰度值大于或等于第二灰度阈值,且所述灰度均值大于第二均值阈值,所述灰度标准差小于第一标准差阈值,则确定所述目标图像的目标亮度等级为第二亮度等级;其中,所述第二灰度阈值大于所述第一灰度阈值,所述第二均值阈值大于所述第一均值阈值。In some exemplary embodiments of the present disclosure, the brightness level module further includes a second brightness level unit, which can be configured if the target gray value is greater than or equal to a second gray threshold, and the gray mean value is greater than the second mean value threshold, the grayscale standard deviation is less than the first standard deviation threshold, then it is determined that the target brightness level of the target image is the second brightness level; wherein, the second grayscale threshold is greater than the first grayscale threshold, so The second mean threshold is greater than the first mean threshold.
在本公开的一些示例性实施例中,亮度等级模块还包括第三亮度等级单元,配置若所述目标灰度值小于或等于所述第一灰度阈值,所述灰度均值大于或等于所述第一均值阈值,或所述灰度标准差大于或等于所述第一标准差阈值,则确定所述目标图像的目标亮度等级为第三亮度等级;或者,若所述目标灰度值大于或等于第二灰度阈值,所述灰度均值小于或等于所述第二均值阈值,或所述灰度标准差大于或等于所述第一标准差阈值,则确定所述目标图像的目标亮度等级为第三亮度等级;或者,若所述目标灰度值大于所述第一灰度阈值且小于所述第二灰度阈值,则确定所述目标图像的目标亮度等级为第三亮度等级。In some exemplary embodiments of the present disclosure, the brightness level module further includes a third brightness level unit configured to, if the target grayscale value is less than or equal to the first grayscale threshold, the grayscale mean value is greater than or equal to the predetermined grayscale value. The first mean threshold value, or the grayscale standard deviation is greater than or equal to the first standard deviation threshold, then the target brightness level of the target image is determined to be the third brightness level; or, if the target grayscale value is greater than or equal to the first standard deviation threshold or equal to the second grayscale threshold, the grayscale mean is less than or equal to the second mean threshold, or the grayscale standard deviation is greater than or equal to the first standard deviation threshold, then determine the target brightness of the target image The level is the third brightness level; or, if the target grayscale value is greater than the first grayscale threshold and less than the second grayscale threshold, the target brightness level of the target image is determined to be the third brightness level.
在本公开的一些示例性实施例中,色彩增强模块包括第一增强单元、第二增强单元和第三增强单元。其中,第一增强单元配置为若所述目标亮度等级为第一亮度等级,则利用第一神经网络模型对所述目标图像进行色彩增强处理,其中所述第一神经网络模型是利用包括第一亮度等级的第一图像训练集训练获得的。第二增强单元配置为若所述目标亮度等级为第二亮度等级,则利用第二神经网络模型对所述目标图像进行色彩增强处理,其中所述第二神经网络模型是利用包括第二亮度等级的第二图像训练集训练获得的。第三增强单元配置为若所述目标亮度等级为第三亮度等级,则利用第三神经网络模型对所述目标图像进行色彩增强处理,其中所述第三神经网络模型是利用包括第三亮度等级的第三图像训练集训练获得的。In some exemplary embodiments of the present disclosure, the color enhancement module includes a first enhancement unit, a second enhancement unit, and a third enhancement unit. Wherein, the first enhancement unit is configured to use a first neural network model to perform color enhancement processing on the target image if the target brightness level is the first brightness level, wherein the first neural network The brightness level is obtained by training on the first image training set. The second enhancement unit is configured to, if the target brightness level is the second brightness level, perform color enhancement processing on the target image by using a second neural network model, wherein the second neural network model is configured by using the second brightness level including the second brightness level. The second image training set obtained by training. The third enhancement unit is configured to, if the target brightness level is the third brightness level, perform color enhancement processing on the target image by using a third neural network model, wherein the third neural network model is configured by using the third brightness level including the third brightness level. The third image training set obtained by training.
在本公开的一些示例性实施例中,图像获取模块包括视频获取单元、目标视频单元和目标图像单元。其中视频获取单元配置为获取待处理视频。目标视频单元配置为根据所述待处理视频获得目标视频;目标图像单元配置为从所述目标视频中确定所述目标图像。In some exemplary embodiments of the present disclosure, the image acquisition module includes a video acquisition unit, a target video unit, and a target image unit. The video acquisition unit is configured to acquire the video to be processed. The target video unit is configured to obtain a target video according to the video to be processed; the target image unit is configured to determine the target image from the target video.
在本公开的一些示例性实施例中,色彩增强模块包括第四增强单元、第五增强单元、第六增强单元和第七增强单元。其中,第四增强单元配置为若所述目标视频中的所述目标图像的目标亮度等级包括第一亮度等级和第三亮度等级,则利用第四神经网络模型对所述目标视频中的视频帧进行色彩增强处理,其中所述第四神经网络模型是利用包括第一亮度等级和第三亮度等级的第四图像训练集训练获得的。第五增强单元配置为若所述目标视频中的所述目标图像的目标亮度等级为第二亮度等级和第三亮度等级,则利用第五神经网络模型对所述目标视频中的视频帧进行色彩增强处理,其中所述第五神经网络模型是利用包括第二亮度等级和第三亮度等级的第四图像训练集训练获得的。第六增强单元配置为若所述目标视频中的所述目标图像的目标亮度等级为第一亮度等级和第二亮度等级,则利用第六神经网络模型对所述目标视频中的视频帧进行色彩增强处理,其中所述第六神经网络模型是利用包括第一亮度等级和第二亮度等级的第六图像训练集训练获得的。第七增强单元配置为若所述目标视频中的所述目标图像的目标亮度等级为第一亮度等级、第二亮度等级和第三亮度等级,则利用第七神经网络模型对所述目标视频中的视频帧进行色彩增强处理,其中所述第七神经网络模型是利用包括第一亮度等级、第二亮度等级和第三亮度等级的第七图像训练集训练获得的。In some exemplary embodiments of the present disclosure, the color enhancement module includes a fourth enhancement unit, a fifth enhancement unit, a sixth enhancement unit, and a seventh enhancement unit. Wherein, the fourth enhancement unit is configured to, if the target brightness level of the target image in the target video includes a first brightness level and a third brightness level, use the fourth neural network model to perform the processing on the video frame in the target video. Perform color enhancement processing, wherein the fourth neural network model is obtained by training a fourth image training set including the first brightness level and the third brightness level. The fifth enhancement unit is configured to use the fifth neural network model to color the video frame in the target video if the target brightness level of the target image in the target video is the second brightness level and the third brightness level. Enhancement processing, wherein the fifth neural network model is obtained by training a fourth image training set including the second brightness level and the third brightness level. The sixth enhancement unit is configured to use the sixth neural network model to color the video frame in the target video if the target brightness level of the target image in the target video is the first brightness level and the second brightness level. Enhancement processing, wherein the sixth neural network model is obtained by training a sixth image training set including the first brightness level and the second brightness level. The seventh enhancement unit is configured to, if the target brightness level of the target image in the target video is the first brightness level, the second brightness level, and the third brightness level, use the seventh neural network model to compare the target brightness in the target video. The color enhancement processing is performed on the video frame of , wherein the seventh neural network model is obtained by training a seventh image training set including a first brightness level, a second brightness level and a third brightness level.
在本公开的一些示例性实施例中,目标视频单元包括镜头检测子单元和目标视频子单元。其中,镜头检测子单元配置为检测获得所述待处理视频中的镜头突变标识位。目标视频子单元配置为根据所述镜头突变标识位分割所述待处理视频,获得至少一个所述目标视频。In some exemplary embodiments of the present disclosure, the target video unit includes a shot detection subunit and a target video subunit. Wherein, the shot detection subunit is configured to detect and obtain shot mutation identification bits in the video to be processed. The target video subunit is configured to divide the video to be processed according to the shot mutation identification bit to obtain at least one target video.
在本公开的一些示例性实施例中,目标图像单元配置为按照预设采样频率对所述目标视频的视频帧进行采样,获得至少一个所述目标图像。In some exemplary embodiments of the present disclosure, the target image unit is configured to sample video frames of the target video according to a preset sampling frequency to obtain at least one target image.
在本公开的一些示例性实施例中,灰度统计模块包括直方图单元、第一统计单元和第二统计单元。其中,直方图单元配置为对所述目标图像中各个像素点的灰度值进行灰度统计,获得所述目标图像的灰度直方图。第一统计单元配置为根据所述灰度直方图的峰值确定所述目标图像中像素点数量最大的灰度值,作为所述目标图像的所述目标灰度值。第二统计单元配置为根据所述目标图像中各个像素点的灰度值和所述目标图像的宽度值、高度值确定所述目标图像的所述灰度均值和所述灰度标准差。In some exemplary embodiments of the present disclosure, the grayscale statistics module includes a histogram unit, a first statistics unit, and a second statistics unit. The histogram unit is configured to perform grayscale statistics on the grayscale values of each pixel in the target image to obtain a grayscale histogram of the target image. The first statistical unit is configured to determine, according to the peak value of the grayscale histogram, the grayscale value with the largest number of pixels in the target image, as the target grayscale value of the target image. The second statistical unit is configured to determine the grayscale mean value and the grayscale standard deviation of the target image according to the grayscale value of each pixel in the target image and the width and height values of the target image.
本公开实施例提出一种电子设备,包括:至少一个处理器;存储装置,用于存储至少一个程序,当所述至少一个程序被所述至少一个处理器执行时,使得所述至少一个处理器实现如上述实施例中所述的图像处理方法。An embodiment of the present disclosure provides an electronic device, including: at least one processor; and a storage device configured to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor The image processing method as described in the above embodiments is implemented.
本公开实施例提出一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如上述实施例中所述的图像处理方法。An embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, implements the image processing method described in the foregoing embodiments.
根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述图像处理方法或者图像处理方法的各种可选实现方式中提供的方法。According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above image processing method or the methods provided in various optional implementations of the image processing method.
在本公开的一些实施例所提供的技术方案中,根据目标图像中各个像素点的灰度值获得的目标灰度值、灰度均值和灰度标准差,能够从不同维度全面表征目标图像的亮度程度,使获得的目标亮度等级具有高准确率。进而保证在根据目标亮度程度对目标图像进行色彩增强处理时,能够有方向地调整目标图像的亮度,避免出现过暗或过曝的图像。同时,仅计算获得目标灰度值、灰度均值和灰度标准差,能够在保证色彩增强质量的前提下大大降低运算复杂度,提升运算效率。In the technical solutions provided by some embodiments of the present disclosure, the target gray value, gray mean value and gray standard deviation obtained according to the gray value of each pixel in the target image can comprehensively characterize the target image from different dimensions. Brightness level, so that the obtained target brightness level has high accuracy. Further, it is ensured that the brightness of the target image can be adjusted in a directional manner when the color enhancement processing is performed on the target image according to the target brightness degree, so as to avoid an image that is too dark or overexposed. At the same time, only the target gray value, gray mean and gray standard deviation are obtained by calculation, which can greatly reduce the computational complexity and improve the computational efficiency while ensuring the quality of color enhancement.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory 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. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort. In the attached image:
图1示出了可以应用本公开实施例的图像处理方法或装置的示例性系统架构的示意图;FIG. 1 shows a schematic diagram of an exemplary system architecture to which an image processing method or apparatus according to an embodiment of the present disclosure can be applied;
图2示意性示出了根据本公开的一个实施例的图像处理方法的流程图;FIG. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图3是基于图2的步骤S240在一个示例性实施例中的流程图;FIG. 3 is a flowchart based on step S240 of FIG. 2 in an exemplary embodiment;
图4是基于图2的步骤S250在一个示例性实施例中的流程图;FIG. 4 is a flowchart based on step S250 of FIG. 2 in an exemplary embodiment;
图5是基于图2的步骤S210在一个示例性实施例中的流程图;FIG. 5 is a flowchart based on step S210 of FIG. 2 in an exemplary embodiment;
图6是基于图2的步骤S250在一个示例性实施例中的流程图;FIG. 6 is a flowchart based on step S250 of FIG. 2 in an exemplary embodiment;
图7是基于图5的步骤S520在一个示例性实施例中的流程图;FIG. 7 is a flowchart based on step S520 of FIG. 5 in an exemplary embodiment;
图8是基于图2的步骤S230在一个示例性实施例中的流程图;FIG. 8 is a flowchart based on step S230 of FIG. 2 in an exemplary embodiment;
图9示意性示出了根据本公开的一个实施例的图像处理方法的流程图;FIG. 9 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图10示意性示出了根据本公开一示例性实施例的机器学习模型的架构图;FIG. 10 schematically shows an architecture diagram of a machine learning model according to an exemplary embodiment of the present disclosure;
图11示意性示出了根据本公开一示例性实施例的机器学习模型的架构图;FIG. 11 schematically shows an architecture diagram of a machine learning model according to an exemplary embodiment of the present disclosure;
图12示意性示出了根据本公开的一实施例的图像处理装置的框图;FIG. 12 schematically shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure;
图13示出了适于用来实现本公开实施例的电子设备的结构示意图。FIG. 13 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments, however, can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本公开的各方面。Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided in order to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be employed. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在至少一个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the figures are merely functional entities and do not necessarily necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in at least one hardware module or integrated circuit, or in different networks and/or processor devices and/or microcontroller devices.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowcharts shown in the figures are only exemplary illustrations and do not necessarily include all contents and operations/steps, nor do they have to be performed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partially combined, so the actual execution order may be changed according to the actual situation.
云技术(Cloud technology)是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。Cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data.
云技术(Cloud technology)是基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,如视频网站、图片类网站和更多的门户网站。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,只能通过云计算来实现。Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business models. Cloud computing technology will become an important support. Background services of technical network systems require a lot of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the back-end system for logical processing. Data of different levels will be processed separately, and all kinds of industry data need to be strong. The system backing support can only be achieved through cloud computing.
人工智能云服务,一般也被称作是AIaaS(AI as a Service,中文为“AI即服务”)。这是目前主流的一种人工智能平台的服务方式,具体来说AIaaS平台会把几类常见的AI服务进行拆分,并在云端提供独立或者打包的服务。这种服务模式类似于开了一个AI主题商城:所有的开发者都可以通过API接口的方式来接入使用平台提供的一种或者是多种人工智能服务,部分资深的开发者还可以使用平台提供的AI框架和AI基础设施来部署和运维自已专属的云人工智能服务。Artificial intelligence cloud services are also generally referred to as AIaaS (AI as a Service, Chinese for "AI as a Service"). This is the current mainstream service method of artificial intelligence platforms. Specifically, the AIaaS platform will split several types of common AI services and provide independent or packaged services in the cloud. This service model is similar to opening an AI-themed mall: all developers can access one or more artificial intelligence services provided by the platform through API interfaces, and some senior developers can also use the platform Provided AI framework and AI infrastructure to deploy and operate its own dedicated cloud AI services.
随着互联网、实时数据流、连接设备多样化的发展,以及搜索服务、社会网络、移动商务和开放协作等需求的推动,云计算迅速发展起来。不同于以往的并行分布式计算,云计算的产生从理念上将推动整个互联网模式、企业管理模式发生革命性的变革。Cloud computing has grown rapidly with the development of the Internet, real-time data streaming, the diversity of connected devices, and the need for search services, social networking, mobile commerce, and open collaboration. Different from the parallel distributed computing in the past, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model.
图1示出了可以应用本公开实施例的图像处理方法或装置的示例性系统架构的示意图。FIG. 1 shows a schematic diagram of an exemplary system architecture to which an image processing method or apparatus according to an embodiment of the present disclosure can be applied.
如图1所示,系统架构100可以包括终端设备101、102、103中的一种或多种,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器105可以是多个服务器组成的服务器集群等。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs. For example, the
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、便携式计算机、台式计算机、可穿戴设备、虚拟现实设备、智能家居、智能相机等等。The user can use the
服务器105可以是提供各种服务的服务器,也可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表等,但并不局限于此。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。例如终端设备103(也可以是终端设备101或102)向服务器105上传目标图像。服务器105可以获取目标图像;获得所述目标图像中各个像素点的灰度值;根据所述目标图像中各个像素点的灰度值,获得所述目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差;根据所述目标灰度值、所述灰度均值和所述灰度标准差确定所述目标图像的目标亮度等级;根据所述目标亮度等级对所述目标图像进行色彩增强处理。并将色彩增强处理结果反馈给终端设备103,进而终端设备103可以通过屏幕展示色彩增强处理后的目标图像或对色彩增强处理后的目标图像进一步进行其他处理,从而能够在保证色彩增强质量的同时实现对图像的快速处理过程。The
又例如,服务器105可以获取待处理视频;根据所述待处理视频获得目标视频;从所述目标视频中确定所述目标图像;获得所述目标图像中各个像素点的灰度值;根据所述目标图像中各个像素点的灰度值,获得所述目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差;根据所述目标灰度值、所述灰度均值和所述灰度标准差确定所述目标图像的目标亮度等级;根据所述目标亮度等级对所述目标图像进行色彩增强处理。并将色彩增强处理结果反馈给终端设备101(也可以是终端设备102或103),进而用户可以基于终端设备101上显示的内容浏览色彩增强处理后的待处理视频,提升用户的观看体验。For another example, the
图2示意性示出了根据本公开的一个实施例的图像处理方法的流程图。本公开实施例所提供的方法可以由任意具备计算处理能力的电子设备处理,例如上述图1实施例中的服务器105和/或终端设备102、103,在下面的实施例中,以服务器105为执行主体为例进行举例说明,但本公开并不限定于此。FIG. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure. The methods provided by the embodiments of the present disclosure can be processed by any electronic device with computing processing capabilities, such as the
如图2所示,本公开实施例提供的图像处理方法可以包括以下步骤。As shown in FIG. 2 , the image processing method provided by the embodiment of the present disclosure may include the following steps.
在步骤S210中,获取目标图像。In step S210, a target image is acquired.
本公开实施例中,目标图像可例如根据视频中的视频帧采样获得。In the embodiment of the present disclosure, the target image may be obtained, for example, according to video frame sampling in the video.
在步骤S220中,获得目标图像中各个像素点的灰度值。In step S220, the gray value of each pixel in the target image is obtained.
本公开实施例中,灰度值是图像中某一像素在黑白图像中呈现出的灰色程度的度量值。在灰度图中,通常显示为从最暗黑色到最亮的白色的灰度。把白色与黑色之间按对数关系分成若干级,称为“灰度等级”。范围一般从0到255,白色为255,黑色为0。In the embodiment of the present disclosure, the gray value is a measure value of the gray level of a certain pixel in the image in the black and white image. In a grayscale image, it usually appears as a grayscale from the darkest black to the brightest white. The relationship between white and black is divided into several levels according to the logarithmic relationship, which is called "gray level". The range is generally from 0 to 255, with 255 for white and 0 for black.
在步骤S230中,根据目标图像中各个像素点的灰度值,获得目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差。In step S230, according to the gray value of each pixel in the target image, the target gray value, the gray mean and the gray standard deviation with the largest number of pixels in the target image are obtained.
本公开实施例中,目标图像中像素点数量最大的目标灰度值是指目标图像中,对各个像素点的灰度值进行统计后获得的各个灰度值的像素点数量中,像素点数量最大的灰度值。灰度均值是对目标图像中各个像素点的灰度值进行均值运算后获得。灰度均值可例如根据下式计算获得:In the embodiment of the present disclosure, the target gray value with the largest number of pixels in the target image refers to the number of pixels of each gray value obtained by counting the gray values of each pixel in the target image. Maximum grayscale value. The gray mean value is obtained by performing mean operation on the gray value of each pixel in the target image. The gray mean value can be obtained, for example, according to the following formula:
其中,ave为灰度均值,Gray(i,j)为目标图像的坐标为(i,j)的像素点的灰度值,width为目标图像的宽度值,height为目标图像的高度值。0<j<width,0<j<height。Among them, ave is the average gray value, Gray(i, j) is the gray value of the pixel point whose coordinates are (i, j) of the target image, width is the width value of the target image, and height is the height value of the target image. 0<j<width, 0<j<height.
灰度标准差是对目标图像中各个像素点的灰度值进行标准差运算后获得。灰度标准差可例如根据下式计算获得:The grayscale standard deviation is obtained by performing standard deviation operation on the grayscale values of each pixel in the target image. The grayscale standard deviation can be calculated, for example, according to the following formula:
其中,std为灰度标准差。Among them, std is the gray standard deviation.
在步骤S240中,根据目标灰度值、灰度均值和灰度标准差确定目标图像的目标亮度等级。In step S240, the target brightness level of the target image is determined according to the target gray value, the gray mean value and the gray standard deviation.
本公开实施例中,可对目标灰度值、灰度均值和灰度标准差进行分析处理,根据分析处理结果确定目标亮度等级。In the embodiment of the present disclosure, the target gray value, the gray mean value and the gray standard deviation can be analyzed and processed, and the target brightness level can be determined according to the analysis and processing results.
其中,可根据预设的数值范围与亮度等级的映射表对目标灰度值、灰度均值和灰度标准差进行处理,将匹配到的亮度等级确定为目标亮度等级。The target gray value, gray mean value and gray standard deviation can be processed according to a preset mapping table of numerical range and brightness level, and the matched brightness level is determined as the target brightness level.
在步骤S250中,根据目标亮度等级对目标图像进行色彩增强处理。In step S250, color enhancement processing is performed on the target image according to the target brightness level.
本公开实施例中,可根据目标亮度等级明确目标图像的色彩增强的具体方案,根据色彩增强的具体方案对目标图像进行色彩增强处理。例如,可根据目标亮度等级的不同,设置不同方式的色彩增强处理方案。In the embodiments of the present disclosure, a specific scheme for color enhancement of the target image may be specified according to the target brightness level, and color enhancement processing is performed on the target image according to the specific scheme for color enhancement. For example, different color enhancement processing schemes can be set according to different target brightness levels.
在示例性实施例中,可根据训练完成的机器学习模型对目标图像进行色彩增强处理,根据机器学习模型的输出结果确定目标图像的色彩增强的处理结果。机器学习模型可例如但不限于为卷积神经网络,但本公开对此并不作特殊限定。In an exemplary embodiment, color enhancement processing may be performed on the target image according to the trained machine learning model, and the processing result of color enhancement of the target image may be determined according to the output result of the machine learning model. The machine learning model can be, for example, but not limited to, a convolutional neural network, which is not specifically limited in the present disclosure.
本公开实施方式提供的图像处理方法,根据目标图像中各个像素点的灰度值获得的目标灰度值、灰度均值和灰度标准差,能够从不同维度全面表征目标图像的亮度程度,使获得的目标亮度等级具有高准确率。进而保证在根据目标亮度程度对目标图像进行色彩增强处理时,能够有方向地调整目标图像的亮度,避免出现过暗或过曝的图像。同时,仅计算获得目标灰度值、灰度均值和灰度标准差,能够在保证色彩增强质量的前提下大大降低运算复杂度,提升运算效率。The image processing method provided by the embodiment of the present disclosure can comprehensively characterize the brightness degree of the target image from different dimensions, and can comprehensively characterize the brightness of the target image from different dimensions by obtaining the target gray value, the gray value mean and the gray standard deviation according to the gray value of each pixel in the target image. The target brightness level is obtained with high accuracy. Further, it is ensured that the brightness of the target image can be adjusted in a directional manner when the color enhancement processing is performed on the target image according to the target brightness degree, so as to avoid an image that is too dark or overexposed. At the same time, only the target gray value, gray mean and gray standard deviation are obtained by calculation, which can greatly reduce the computational complexity and improve the computational efficiency while ensuring the quality of color enhancement.
图3是基于图2的步骤S240在一个示例性实施例中的流程图。FIG. 3 is a flowchart based on step S240 of FIG. 2 in an exemplary embodiment.
如图3所示,上述图2实施例中的步骤S240可以进一步包括以下步骤。As shown in FIG. 3 , step S240 in the above embodiment of FIG. 2 may further include the following steps.
在步骤S310中,若目标灰度值小于或等于第一灰度阈值,且灰度均值小于第一均值阈值,灰度标准差小于第一标准差阈值,则确定目标图像的目标亮度等级为第一亮度等级。In step S310, if the target gray value is less than or equal to the first gray threshold, the gray mean value is less than the first mean threshold, and the gray standard deviation is less than the first standard deviation threshold, then the target brightness level of the target image is determined to be the first a brightness level.
本公开实施例中,第一灰度阈值、第一均值阈值、第一标准差阈值可根据经验获得,在示例性实施例中,第一灰度阈值的值可例如为50,第一均值阈值可例如为60,第一标准差阈值可例如为40。但本公开对此并不作特殊限定。第一亮度等级可为亮度较低的等级。其中,当目标灰度值、灰度均值和灰度标准差满足步骤S310中的判断条件时,可认为目标图像的整体亮度很小。灰度标准差体现了图像颜色分布的大小,标准差越小则目标图像的像素值分布大小与均值更加接近,标准差越大像素值分布越广泛,所以灰度标准差越小说明目标图像的亮度区域出现的很少。因此,在满足上述S310的条件时,则判断该目标图像的亮度较低,为第一亮度等级。In this embodiment of the present disclosure, the first grayscale threshold, the first mean threshold, and the first standard deviation threshold may be obtained according to experience. In an exemplary embodiment, the value of the first grayscale threshold may be, for example, 50, and the first mean threshold It may be, for example, 60, and the first standard deviation threshold may be, for example, 40. However, the present disclosure does not make any special limitation on this. The first brightness level may be a lower brightness level. Wherein, when the target gray value, gray mean value and gray standard deviation satisfy the judgment conditions in step S310, it can be considered that the overall brightness of the target image is very small. The grayscale standard deviation reflects the size of the color distribution of the image. The smaller the standard deviation, the closer the pixel value distribution of the target image is to the mean. The larger the standard deviation, the wider the pixel value distribution. Brightness areas appear rarely. Therefore, when the above conditions of S310 are satisfied, it is determined that the brightness of the target image is low and is the first brightness level.
在示例性实施例中,上述图2实施例中的步骤S240可以进一步包括以下步骤。In an exemplary embodiment, step S240 in the above embodiment of FIG. 2 may further include the following steps.
在步骤S320中,若目标灰度值大于或等于第二灰度阈值,且灰度均值大于第二均值阈值,灰度标准差小于第一标准差阈值,则确定目标图像的目标亮度等级为第二亮度等级;其中,第二灰度阈值大于第一灰度阈值,第二均值阈值大于第一均值阈值。In step S320, if the target gray value is greater than or equal to the second gray threshold, and the gray mean value is greater than the second mean threshold, and the gray standard deviation is less than the first standard deviation threshold, the target brightness level of the target image is determined to be the first Two brightness levels; wherein, the second grayscale threshold is greater than the first grayscale threshold, and the second average threshold is greater than the first average threshold.
本公开实施例中,第二灰度阈值、第二均值阈值可根据经验获得。在示例性实施例中,第二灰度阈值可例如为200,第二均值阈值可例如为180,但本公开对此并不作特殊限定。第二亮度等级可为亮度过亮的等级。其中,当目标灰度值、灰度均值和灰度标准差满足步骤S320中的判断条件时,可认为目标图像的整体亮度过亮,即曝光过度的图像。In the embodiment of the present disclosure, the second grayscale threshold and the second average threshold can be obtained according to experience. In an exemplary embodiment, the second grayscale threshold may be, for example, 200, and the second average threshold may be, for example, 180, but this disclosure does not make a special limitation on this. The second brightness level may be an excessively bright level. Wherein, when the target gray value, gray mean value and gray standard deviation satisfy the judgment conditions in step S320, it can be considered that the overall brightness of the target image is too bright, that is, an image that is overexposed.
在示例性实施例中,上述图2实施例中的步骤S240可以进一步包括以下步骤。In an exemplary embodiment, step S240 in the above embodiment of FIG. 2 may further include the following steps.
在步骤S330中,若目标灰度值小于或等于第一灰度阈值,灰度均值大于或等于第一均值阈值,或灰度标准差大于或等于第一标准差阈值,则确定目标图像的目标亮度等级为第三亮度等级;或者,In step S330, if the target gray value is less than or equal to the first gray threshold, the gray mean value is greater than or equal to the first mean threshold, or the gray standard deviation is greater than or equal to the first standard deviation threshold, the target image of the target image is determined. The brightness level is the third brightness level; or,
在步骤S340中,若目标灰度值大于或等于第二灰度阈值,灰度均值小于或等于第二均值阈值,或灰度标准差大于或等于第一标准差阈值,则确定目标图像的目标亮度等级为第三亮度等级;或者,In step S340, if the target gray value is greater than or equal to the second gray threshold, the gray mean value is less than or equal to the second mean threshold, or the gray standard deviation is greater than or equal to the first standard deviation threshold, then determine the target of the target image The brightness level is the third brightness level; or,
在步骤S350中,若目标灰度值大于第一灰度阈值且小于第二灰度阈值,则确定目标图像的目标亮度等级为第三亮度等级。In step S350, if the target grayscale value is greater than the first grayscale threshold and less than the second grayscale threshold, it is determined that the target brightness level of the target image is the third brightness level.
本公开实施例中,第三亮度等级可为亮度中等的亮度级别。该示例性实施例中所包括的条件集合为步骤S310-S320中所包括的条件集合的补集。即,在不满足步骤S310或S320中的条件时,可认为目标图像的整体亮度处于中等水平。In the embodiment of the present disclosure, the third brightness level may be a brightness level with medium brightness. The set of conditions included in this exemplary embodiment is the complement of the set of conditions included in steps S310-S320. That is, when the conditions in step S310 or S320 are not satisfied, it can be considered that the overall brightness of the target image is at an intermediate level.
在该实施例中,通过对目标灰度值、灰度均值和灰度标准差三个维度进行精准的分析判断,能够根据目标灰度值、灰度均值和灰度标准差的具体数值准确地分析获得目标图像的目标亮度等级。In this embodiment, by accurately analyzing and judging the three dimensions of the target gray value, the gray mean value and the gray standard deviation, it is possible to accurately analyze and judge the target gray value, the gray mean value and the gray standard deviation according to the specific values of the target gray value, the gray mean value and the gray standard deviation. The analysis obtains the target brightness level of the target image.
图4是基于图2的步骤S250在一个示例性实施例中的流程图。FIG. 4 is a flowchart based on step S250 of FIG. 2 in an exemplary embodiment.
如图4所示,上述图2实施例中的步骤S250可以进一步包括以下步骤。在该实施例中,可根据训练完成的机器学习模型对目标图像进行色彩增强处理,根据机器学习模型的输出结果确定目标图像的色彩增强的处理结果。其中,机器学习模型可包括第一神经网络模型、第二神经网络模型和第三神经网络模型。图10示意性示出了根据本公开一示例性实施例的机器学习模型的架构图。如图10所示,机器学习模型可包括第一神经网络模型1010、第二神经网络模型1020、第三神经网络模型1030和切换模块1040。其中,第一神经网络模型1010采用的网络结构可以是图像生成网络,例如超分辨率模型(Super ResolutionConvolutional Neural Network,SRCNN),图像风格转换网络(Cycle GenerativeAdversarial Networks,cycleGAN)等,第二神经网络模型1020以及第三神经网络模型1030采用的网络结构可以与第一网络模型模型1010相同或选择其他图像生成模型。第一神经网络模型1010与第二神经网络模型1020、第三神经网络模型1030的网络结构可以不同,也可以选择一致,三个网络模型的主要差别在于,即使在网络结构一致的情况下,根据不同的场景区分出不同的图像类型作为网络的训练集,则可通过训练得到不同场景的网络模型。所述切换模块1040,根据目标亮度等级,可以选择对应设置的神经网络模型进行处理。举例来说,所述切换模块1040设置有判断单元,其执行上述步骤S220~S240和/或步骤S310~S350的流程。此外,所述切换模块1040还可以进一步包括选择单元,以根据判断单元的判断结果,来选择不同的神经网络模型。该实施例中的机器学习模型可例如通过人工智能云服务的框架实现。As shown in FIG. 4 , step S250 in the above embodiment of FIG. 2 may further include the following steps. In this embodiment, color enhancement processing may be performed on the target image according to the trained machine learning model, and the color enhancement processing result of the target image may be determined according to the output result of the machine learning model. Wherein, the machine learning model may include a first neural network model, a second neural network model and a third neural network model. FIG. 10 schematically shows an architecture diagram of a machine learning model according to an exemplary embodiment of the present disclosure. As shown in FIG. 10 , the machine learning model may include a first
在步骤S410中,若目标亮度等级为第一亮度等级,则利用第一神经网络模型1010对目标图像进行色彩增强处理,其中第一神经网络模型1010是利用包括第一亮度等级的第一图像训练集训练获得的。In step S410, if the target brightness level is the first brightness level, use the first
本公开实施例中,可例如根据切换模块1040选择第一神经网络模型1010对目标图像进行色彩增强处理。In this embodiment of the present disclosure, for example, the first
在示例性实施例中,若目标亮度等级为第一亮度等级,还可通过调整色彩模式(LAB通道)中明度通道(L通道)来对亮度和对比度进行特殊的调整,以恢复出更多的细节,再进行色度的调整,实现对目标图像的色彩增强处理。In an exemplary embodiment, if the target brightness level is the first brightness level, the brightness and contrast can be specially adjusted by adjusting the brightness channel (L channel) in the color mode (LAB channel) to restore more details, and then adjust the chromaticity to realize the color enhancement processing of the target image.
在步骤S420中,若目标亮度等级为第二亮度等级,则利用第二神经网络模型1020对目标图像进行色彩增强处理,其中第二神经网络模型1020是利用包括第二亮度等级的第二图像训练集训练获得的。In step S420, if the target brightness level is the second brightness level, use the second
本公开实施例中,可例如根据切换模块1040选择第二神经网络模型1020对目标图像进行色彩增强处理。In this embodiment of the present disclosure, for example, the second
在示例性实施例中,若目标亮度等级为第二亮度等级,还可通过调整色彩模式(LAB通道)中明度通道(L通道)来对亮度和对比度进行特殊的调整,以恢复出更多的细节,再进行色度的调整,实现对目标图像的色彩增强处理。In an exemplary embodiment, if the target brightness level is the second brightness level, the brightness and contrast can be specially adjusted by adjusting the brightness channel (L channel) in the color mode (LAB channel) to restore more details, and then adjust the chromaticity to realize the color enhancement processing of the target image.
在步骤S430中,若目标亮度等级为第三亮度等级,则利用第三神经网络模型1030对目标图像进行色彩增强处理,其中第三神经网络模型1030是利用包括第三亮度等级的第三图像训练集训练获得的。In step S430, if the target brightness level is the third brightness level, use the third
本公开实施例中,可例如根据切换模块1040选择第三神经网络模型1030对目标图像进行色彩增强处理。In this embodiment of the present disclosure, the third
在示例性实施例中,当目标亮度等级为第三亮度等级时,还可通过增强亮度、对比度、饱和度的方式实现对目标图像的色彩增强处理。In an exemplary embodiment, when the target brightness level is the third brightness level, the color enhancement processing on the target image can also be implemented by enhancing brightness, contrast, and saturation.
在该实施例中,采用不同的色彩增强方式对具有不同亮度程度的目标图像进行处理,能够自适应且有效地调整目标图像的亮度。In this embodiment, different color enhancement methods are used to process target images with different brightness levels, so that the brightness of the target images can be adjusted adaptively and effectively.
图5是基于图2的步骤S210在一个示例性实施例中的流程图。FIG. 5 is a flowchart based on step S210 of FIG. 2 in an exemplary embodiment.
如图5所示,上述图2实施例中的步骤S210可以进一步包括以下步骤。As shown in FIG. 5 , step S210 in the above embodiment of FIG. 2 may further include the following steps.
在步骤S510中,获取待处理视频。In step S510, the video to be processed is acquired.
在步骤S520中,根据待处理视频获得目标视频。In step S520, the target video is obtained according to the video to be processed.
本公开实施例中,可例如通过检测场景切变,根据场景切变的检测结果对待处理视频进行切分,获得目标视频。例如,可获得待处理视频中每个视频帧进行与上一帧的帧差图像,并计算上一帧帧差图像和该帧得到的帧差图像的均值,通过比较帧差均值的大小及变化情况判断该帧是否为切变帧。并根据切变帧对待处理视频进行切割,获得目标视频。In the embodiment of the present disclosure, the target video may be obtained by, for example, detecting scene transitions and segmenting the video to be processed according to the detection results of the scene transitions. For example, the frame difference image of each video frame in the video to be processed and the previous frame can be obtained, and the average value of the frame difference image of the previous frame and the frame difference image obtained from this frame can be calculated. The situation determines whether the frame is a shear frame. And cut the video to be processed according to the cut frame to obtain the target video.
在步骤S530中,从目标视频中确定目标图像。In step S530, the target image is determined from the target video.
本公开实施例中,可将目标视频中的每一帧确定为目标图像。In the embodiment of the present disclosure, each frame in the target video may be determined as the target image.
在示例性实施例中,可按照预设采样频率对目标视频的视频帧进行采样,获得至少一个目标图像。In an exemplary embodiment, the video frame of the target video may be sampled according to a preset sampling frequency to obtain at least one target image.
图6是基于图2的步骤S250在一个示例性实施例中的流程图。FIG. 6 is a flowchart based on step S250 of FIG. 2 in an exemplary embodiment.
如图6所示,上述图2实施例中的步骤S250可以进一步包括以下步骤。在该实施例中,机器学习模型还可包括第四神经网络模型、第五神经网络模型、第六神经网络模型和第七神经网络模型。图11示意性示出了根据本公开一示例性实施例的机器学习模型的架构图。如图11所示,机器学习模型可包括第四神经网络模型1110、第五神经网络模型1120、第六神经网络模型1130、第七神经网络模型1140和切换模块1150。其中,第四神经网络模型1110采用的网络结构可以是图像生成网络,例如超分辨率模型,图像风格转换网络等,第四神经网络模型1110与第五神经网络模型1120、第六神经网络模型1130和第七神经网络模型1140的网络结构可以不同,也可以选择一致,四个网络模型的主要差别在于,即使在网络结构一致的情况下,根据不同的场景区分出不同的图像类型作为网络的训练集,则可通过训练得到不同场景的网络模型。所述切换模块1150,根据目标亮度等级,可以选择对应设置的神经网络模型进行处理。举例来说,所述切换模块1150设置有判断单元,其执行上述步骤S220~S240和/或步骤S310~S350和/或S510~S530的流程。此外,所述切换模块1150还可以进一步包括选择单元,以根据判断单元的判断结果,来选择不同的神经网络模型。该实施例中的机器学习模型可例如通过人工智能云服务的框架实现。As shown in FIG. 6 , step S250 in the above embodiment of FIG. 2 may further include the following steps. In this embodiment, the machine learning model may further include a fourth neural network model, a fifth neural network model, a sixth neural network model, and a seventh neural network model. FIG. 11 schematically shows an architecture diagram of a machine learning model according to an exemplary embodiment of the present disclosure. As shown in FIG. 11 , the machine learning model may include a fourth
在步骤S610中,若目标视频中的目标图像的目标亮度等级包括第一亮度等级和第三亮度等级,则利用第四神经网络模型1110对目标视频中的目标图像进行色彩增强处理,其中第四神经网络模型1110是利用包括第一亮度等级和第三亮度等级的第四图像训练集训练获得的。In step S610, if the target brightness level of the target image in the target video includes the first brightness level and the third brightness level, the fourth
本公开实施例中,可例如根据切换模块1150选择第四神经网络模型1110对目标图像进行色彩增强处理。In the embodiment of the present disclosure, the fourth
本公开实施例中,由于目标视频中包括多种亮度等级:第一亮度等级和第三亮度等级,通过能够处理两种亮度等级的人工智能模型对目标视频中的目标图像进行处理,能够自适应处理不同亮度等级的目标图像,使色彩增强处理后获得的目标视频中每个视频帧均具有良好的色彩亮度。避免目标视频中出现过亮或过曝的视频帧。In the embodiment of the present disclosure, since the target video includes multiple brightness levels: the first brightness level and the third brightness level, the target image in the target video is processed by an artificial intelligence model capable of processing the two brightness levels, and adaptive The target images with different brightness levels are processed, so that each video frame in the target video obtained after the color enhancement process has good color brightness. Avoid overly bright or overexposed video frames in the target video.
在步骤S620中,若目标视频中的目标图像的目标亮度等级为第二亮度等级和第三亮度等级,则利用第五神经网络模型1120对目标视频中的目标图像进行色彩增强处理,其中第五神经网络模型1120是利用包括第二亮度等级和第三亮度等级的第四图像训练集训练获得的。In step S620, if the target brightness level of the target image in the target video is the second brightness level and the third brightness level, the fifth
本公开实施例中,可例如根据切换模块1150选择第五神经网络模型1120对目标图像进行色彩增强处理。In the embodiment of the present disclosure, the fifth
在步骤S630中,若目标视频中的目标图像的目标亮度等级为第一亮度等级和第二亮度等级,则利用第六神经网络模型1130对目标视频中的目标图像进行色彩增强处理,其中第六神经网络模型是利用包括第一亮度等级和第二亮度等级的第六图像训练集训练获得的。In step S630, if the target brightness level of the target image in the target video is the first brightness level and the second brightness level, the sixth
本公开实施例中,可例如根据切换模块1150选择第六神经网络模型1130对目标图像进行色彩增强处理。In the embodiment of the present disclosure, the sixth
在步骤S640中,若目标视频中的目标图像的目标亮度等级为第一亮度等级、第二亮度等级和第三亮度等级,则利用第七神经网络模型1140对目标视频中的目标图像进行色彩增强处理,其中第七神经网络模型1140是利用包括第一亮度等级、第二亮度等级和第三亮度等级的第七图像训练集训练获得的。In step S640, if the target brightness level of the target image in the target video is the first brightness level, the second brightness level and the third brightness level, the seventh
本公开实施例中,可例如根据切换模块1150选择第七神经网络模型1140对目标图像进行色彩增强处理。In the embodiment of the present disclosure, the seventh
在该实施例中,在批量处理一个目标视频中的视频帧时,获得该目标视频中目标图像的目标亮度等级,采用不同的色彩增强方式对具有不同亮度程度的目标视频的视频帧进行处理,能够自适应且有效地调整目标图像的亮度。In this embodiment, when batch processing video frames in a target video, the target brightness level of the target image in the target video is obtained, and different color enhancement methods are used to process the video frames of the target video with different brightness levels, The brightness of the target image can be adjusted adaptively and efficiently.
图7是基于图5的步骤S520在一个示例性实施例中的流程图。FIG. 7 is a flowchart based on step S520 of FIG. 5 in an exemplary embodiment.
如图7所示,上述图5实施例中的步骤S520可以进一步包括以下步骤。As shown in FIG. 7 , step S520 in the above embodiment of FIG. 5 may further include the following steps.
在步骤S710中,检测获得待处理视频中的镜头突变标识位。In step S710, a shot mutation flag in the video to be processed is obtained by detection.
本公开实施例中,可计算获得待处理视频中相邻帧的帧差图像,并根据帧差图像的均值的大小进行判断,根据判断结果确定镜头突变标识位。在示例性实施例中,在计算帧差图像之前,还可首先将视频图像分帧处理后,再将每帧三通道彩色图像转换成单通道的灰度图像;将得到的灰度图像进行下采样,解决对于高像素图像算法计算量过高的问题,提升算法效率。利用滤波算法(例如加博尔滤波算法,Gabor滤波算法)对图像进行预处理,该方法能够有效提取图像的内容,解决光强度突变干扰问题。In the embodiment of the present disclosure, the frame difference images of adjacent frames in the video to be processed may be obtained by calculation, and the judgment is made according to the average value of the frame difference images, and the shot mutation flag bit is determined according to the judgment result. In an exemplary embodiment, before calculating the frame difference image, the video image may be divided into frames, and then the three-channel color image of each frame is converted into a single-channel grayscale image; Sampling, to solve the problem of high computational complexity for high-pixel image algorithms, and improve the efficiency of the algorithm. Using filtering algorithm (eg Gabor filtering algorithm, Gabor filtering algorithm) to preprocess the image, this method can effectively extract the content of the image and solve the problem of light intensity mutation interference.
在步骤S720中,根据镜头突变标识位分割待处理视频,获得至少一个目标视频。In step S720, the to-be-processed video is segmented according to the shot mutation flag to obtain at least one target video.
在该实施例中,通过检测镜头突变标识位,并根据镜头突变标识位对待处理视频进行切割,能够将待处理视频按照场景切变进行划分获得目标视频,以便以目标视频为单位进行色彩增强时,能够聚合性地对具有类似场景的视频帧进行色彩增强,提高色彩增强处理时所选色彩增强方法的适用性。In this embodiment, by detecting the shot mutation flag and cutting the video to be processed according to the shot mutation flag, the target video can be obtained by dividing the to-be-processed video according to the scene cut, so that color enhancement is performed in units of the target video. , which can aggregately enhance the color of video frames with similar scenes, and improve the applicability of the selected color enhancement method during color enhancement processing.
图8是基于图2的步骤S230在一个示例性实施例中的流程图。FIG. 8 is a flowchart based on step S230 of FIG. 2 in an exemplary embodiment.
如图8所示,上述图2实施例中的步骤S230可以进一步包括以下步骤。As shown in FIG. 8 , step S230 in the above embodiment of FIG. 2 may further include the following steps.
在步骤S810中,对目标图像中各个像素点的灰度值进行灰度统计,获得目标图像的灰度直方图。In step S810, grayscale statistics are performed on the grayscale values of each pixel in the target image to obtain a grayscale histogram of the target image.
本公开实施例中,灰度直方图是关于灰度级分布的函数,是对图像中灰度级分布的统计。灰度直方图是将数字图像中的所有像素,按照灰度值的大小,统计其出现的频率。灰度直方图是灰度级的函数,它表示图像中具有某种灰度级的像素的个数,反映了图像中某种灰度出现的频率。In the embodiment of the present disclosure, the grayscale histogram is a function related to the grayscale distribution, and is a statistic on the grayscale distribution in the image. The grayscale histogram is to count all the pixels in the digital image, according to the size of the grayscale value, to count the frequency of their occurrence. The grayscale histogram is a function of grayscale, which represents the number of pixels with a certain grayscale in the image, and reflects the frequency of a certain grayscale in the image.
在步骤S820中,根据灰度直方图的峰值确定目标图像中像素点数量最大的灰度值,作为目标图像的目标灰度值。In step S820, the grayscale value with the largest number of pixels in the target image is determined according to the peak value of the grayscale histogram as the target grayscale value of the target image.
本公开实施例中,可根据灰度直方图中的峰值确定出现次数最多的像素个数,并将该峰值对应的灰度值确定为目标灰度值。In the embodiment of the present disclosure, the number of pixels with the largest number of occurrences may be determined according to the peak value in the grayscale histogram, and the grayscale value corresponding to the peak value is determined as the target grayscale value.
在步骤S830中,根据目标图像中各个像素点的灰度值和目标图像的宽度值、高度值确定目标图像的灰度均值和灰度标准差。In step S830, the grayscale mean value and the grayscale standard deviation of the target image are determined according to the grayscale values of each pixel in the target image and the width and height values of the target image.
本公开实施例中,灰度均值和灰度标准差可例如通过公式(1)、(2)获得,此处不再赘述。In the embodiment of the present disclosure, the gray-scale mean value and the gray-scale standard deviation can be obtained, for example, by formulas (1) and (2), which will not be repeated here.
图9示意性示出了根据本公开的一个实施例的图像处理方法的流程图。FIG. 9 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure.
如图9所示,本实施例提供的图像处理方法包括以下步骤。As shown in FIG. 9 , the image processing method provided by this embodiment includes the following steps.
在步骤S905中,获取待处理视频。In step S905, the video to be processed is acquired.
在步骤S910中,检测获得待处理视频中的镜头突变标识位。In step S910, a shot mutation flag in the video to be processed is obtained by detection.
在步骤S915中,根据镜头突变标识位分割待处理视频,获得至少一个目标视频。In step S915, the to-be-processed video is segmented according to the shot mutation flag to obtain at least one target video.
在步骤S920中,按照预设采样频率对目标视频的视频帧进行采样,获得至少一个目标图像。In step S920, the video frame of the target video is sampled according to the preset sampling frequency to obtain at least one target image.
在步骤S925中,获得目标图像中各个像素点的灰度值。In step S925, the gray value of each pixel in the target image is obtained.
在步骤S930中,根据目标图像中各个像素点的灰度值,获得目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差。In step S930, according to the gray value of each pixel in the target image, the target gray value, the gray average value and the gray standard deviation with the largest number of pixels in the target image are obtained.
在步骤S935至S955中,根据目标灰度值、灰度均值和灰度标准差确定目标图像的目标亮度等级。具体地:In steps S935 to S955, the target brightness level of the target image is determined according to the target gray value, gray mean value and gray standard deviation. specifically:
在步骤S935中,若目标灰度值大于50且小于200,则确认目标图像的目标亮度等级为第三亮度等级。In step S935, if the target gray value is greater than 50 and less than 200, it is confirmed that the target brightness level of the target image is the third brightness level.
在步骤S940中,若目标灰度值大于0且小于或等于50,且灰度均值小于60,灰度标准差小于40时,则确认目标图像的目标亮度等级为第一亮度等级。In step S940, if the target gray value is greater than 0 and less than or equal to 50, and the gray mean value is less than 60 and the gray standard deviation is less than 40, then confirm that the target brightness level of the target image is the first brightness level.
在步骤S945中,若目标灰度值大于0且小于或等于50,灰度均值大于或等于60,或灰度标准差大于或等于40时,则确认目标图像的目标亮度等级为第三亮度等级。In step S945, if the target gray value is greater than 0 and less than or equal to 50, the gray mean value is greater than or equal to 60, or the gray standard deviation is greater than or equal to 40, confirm that the target brightness level of the target image is the third brightness level .
在步骤S950中,若目标灰度值大于或等于200且小于或等于255,且灰度均值大于180,灰度标准差小于40时,则确认目标图像的目标亮度等级为第二亮度等级。In step S950, if the target gray value is greater than or equal to 200 and less than or equal to 255, and the gray mean value is greater than 180 and the gray standard deviation is less than 40, then confirm that the target brightness level of the target image is the second brightness level.
在步骤S955中,若目标灰度值大于或等于200且小于或等于255,灰度均值小于或等于180,或灰度标准差大于或等于40时,则确认目标图像的目标亮度等级为第三亮度等级。In step S955, if the target gray value is greater than or equal to 200 and less than or equal to 255, the gray mean value is less than or equal to 180, or the gray standard deviation is greater than or equal to 40, confirm that the target brightness level of the target image is the third Brightness level.
在步骤S960-S990中,根据目标视频中目标图像的目标亮度等级对目标视频中的视频帧进行色彩增强处理。该实施例中的机器学习模型可例如通过人工智能云服务的框架实现。具体地:In steps S960-S990, color enhancement processing is performed on the video frames in the target video according to the target brightness level of the target image in the target video. The machine learning model in this embodiment can be implemented, for example, through the framework of artificial intelligence cloud services. specifically:
在步骤S960中,若目标视频中的目标图像的目标亮度等级为第一亮度等级,则利用第一神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S960, if the target brightness level of the target image in the target video is the first brightness level, the first neural network model is used to perform color enhancement processing on the video frame in the target video.
在步骤S965中,若目标视频中的目标图像的目标亮度等级为第二亮度等级,则利用第二神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S965, if the target brightness level of the target image in the target video is the second brightness level, the second neural network model is used to perform color enhancement processing on the video frame in the target video.
在步骤S970中,若目标视频中的目标图像的目标亮度等级为第三亮度等级,则利用第三神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S970, if the target brightness level of the target image in the target video is the third brightness level, the third neural network model is used to perform color enhancement processing on the video frame in the target video.
在步骤S975中,若目标视频中的目标图像的目标亮度等级为第一亮度等级和第三亮度等级,则利用第四神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S975, if the target brightness level of the target image in the target video is the first brightness level and the third brightness level, the fourth neural network model is used to perform color enhancement processing on the video frame in the target video.
在步骤S980中,若目标视频中的目标图像的目标亮度等级为第二亮度等级和第三亮度等级,则利用第五神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S980, if the target brightness level of the target image in the target video is the second brightness level and the third brightness level, the fifth neural network model is used to perform color enhancement processing on the video frame in the target video.
在步骤S985中,若目标视频中的目标图像的目标亮度等级为第一亮度等级和第二亮度等级,则利用第六神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S985, if the target brightness level of the target image in the target video is the first brightness level and the second brightness level, the sixth neural network model is used to perform color enhancement processing on the video frame in the target video.
在步骤S990中,若目标视频中的目标图像的目标亮度等级为第一亮度等级、第二亮度等级和第三亮度等级,则利用第七神经网络模型对目标视频中的视频帧进行色彩增强处理。In step S990, if the target brightness level of the target image in the target video is the first brightness level, the second brightness level and the third brightness level, the seventh neural network model is used to perform color enhancement processing on the video frame in the target video .
在该实施例中,通过检测待处理视频的镜头突变标识位,并根据镜头突变标识位对待处理视频进行切割,能够将待处理视频按照场景切变进行划分获得目标视频。在后续根据目标视频中每个目标图像的目标亮度等级对目标视频进行色彩增强时,能够聚合性地对具有类似场景的视频帧进行色彩增强,提高色彩增强处理时所选色彩增强方法的适用性。同时,在确定每个目标图像的目标亮度等级时,能够根据目标图像的目标灰度值、灰度标准差、灰度均值三个维度进行考虑,使获得的目标亮度等级具有高准确率。仅计算获得目标灰度值、灰度均值和灰度标准差,能够在保证色彩增强质量的前提下大大降低运算复杂度,提升运算效率。In this embodiment, the target video can be obtained by dividing the to-be-processed video according to scene cuts by detecting the shot mutation flag of the video to be processed, and cutting the to-be-processed video according to the shot mutation flag. When the target video is subsequently color enhanced according to the target brightness level of each target image in the target video, the video frames with similar scenes can be collectively enhanced to improve the applicability of the selected color enhancement method during the color enhancement process. . At the same time, when determining the target brightness level of each target image, it can be considered according to the three dimensions of target gray value, gray standard deviation and gray mean value of the target image, so that the obtained target brightness level has high accuracy. Only calculating the target gray value, gray mean and gray standard deviation can greatly reduce the computational complexity and improve the computational efficiency while ensuring the quality of color enhancement.
以下介绍本公开的装置实施例,可以用于执行本公开上述的图像处理方法。对于本公开装置实施例中未披露的细节,请参照本公开上述的图像处理方法的实施例。The following describes the device embodiments of the present disclosure, which can be used to execute the above-mentioned image processing method of the present disclosure. For details not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the above-mentioned embodiments of the image processing method of the present disclosure.
图12示意性示出了根据本公开的一实施例的图像处理装置的框图。FIG. 12 schematically shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
参照图12所示,根据本公开的一个实施例的图像处理装置1200,可以包括:图像获取模块1210、像素灰度模块1220、灰度统计模块1230、亮度等级模块1240以及色彩增强模块1250。12 , an
图像获取模块1210可配置为获取目标图像。The
像素灰度模块1220可配置为获得目标图像中各个像素点的灰度值。The
灰度统计模块1230可配置为根据目标图像中各个像素点的灰度值,获得目标图像中像素点数量最大的目标灰度值、灰度均值和灰度标准差。The
亮度等级模块1240可配置为根据目标灰度值、灰度均值和灰度标准差确定目标图像的目标亮度等级。The
色彩增强模块1250可配置为根据目标亮度等级对目标图像进行色彩增强处理。The
本公开实施方式提供的图像处理装置,根据目标图像中各个像素点的灰度值获得的目标灰度值、灰度均值和灰度标准差,能够从不同维度全面表征目标图像的亮度程度,使获得的目标亮度等级具有高准确率。进而保证在根据目标亮度程度对目标图像进行色彩增强处理时,能够有方向地调整目标图像的亮度,避免出现过暗或过曝的图像。同时,仅计算获得目标灰度值、灰度均值和灰度标准差,能够在保证色彩增强质量的前提下大大降低运算复杂度,提升运算效率。The image processing device provided by the embodiments of the present disclosure can comprehensively characterize the brightness of the target image from different dimensions, and can comprehensively characterize the brightness of the target image from different dimensions by obtaining the target grayscale value, the grayscale mean value, and the grayscale standard deviation according to the grayscale values of each pixel in the target image, so that the The target brightness level is obtained with high accuracy. Further, it is ensured that the brightness of the target image can be adjusted in a directional manner when the color enhancement processing is performed on the target image according to the target brightness degree, so as to avoid an image that is too dark or overexposed. At the same time, only the target gray value, gray mean and gray standard deviation are obtained by calculation, which can greatly reduce the computational complexity and improve the computational efficiency while ensuring the quality of color enhancement.
在示例性实施例中,亮度等级模块1240可包括第一亮度等级单元,可配置为若目标灰度值小于或等于第一灰度阈值,且灰度均值小于第一均值阈值,灰度标准差小于第一标准差阈值,则确定目标图像的目标亮度等级为第一亮度等级。In an exemplary embodiment, the
在示例性实施例中,亮度等级模块1240还可包括第二亮度等级单元,可配置若目标灰度值大于或等于第二灰度阈值,且灰度均值大于第二均值阈值,灰度标准差小于第一标准差阈值,则确定目标图像的目标亮度等级为第二亮度等级;其中,第二灰度阈值大于第一灰度阈值,第二均值阈值大于第一均值阈值。In an exemplary embodiment, the
在示例性实施例中,亮度等级模块1240还可包括第三亮度等级单元,可配置若目标灰度值小于或等于第一灰度阈值,灰度均值大于或等于第一均值阈值,或灰度标准差大于或等于第一标准差阈值,则确定目标图像的目标亮度等级为第三亮度等级;或者,若目标灰度值大于或等于第二灰度阈值,灰度均值小于或等于第二均值阈值,或灰度标准差大于或等于第一标准差阈值,则确定目标图像的目标亮度等级为第三亮度等级;或者,若目标灰度值大于第一灰度阈值且小于第二灰度阈值,则确定目标图像的目标亮度等级为第三亮度等级。In an exemplary embodiment, the
在示例性实施例中,色彩增强模块1250可包括第一增强单元、第二增强单元和第三增强单元。其中,第一增强单元可配置为若目标亮度等级为第一亮度等级,则利用第一神经网络模型对目标图像进行色彩增强处理,其中第一神经网络模型是利用包括第一亮度等级的第一图像训练集训练获得的。第二增强单元可配置为若目标亮度等级为第二亮度等级,则利用第二神经网络模型对目标图像进行色彩增强处理,其中第二神经网络模型是利用包括第二亮度等级的第二图像训练集训练获得的。第三增强单元可配置为若目标亮度等级为第三亮度等级,则利用第三神经网络模型对目标图像进行色彩增强处理,其中第三神经网络模型是利用包括第三亮度等级的第三图像训练集训练获得的。In an exemplary embodiment, the
在示例性实施例中,图像获取模块1210可包括视频获取单元、目标视频单元和目标图像单元。其中视频获取单元可配置为获取待处理视频。目标视频单元可配置为根据待处理视频获得目标视频;目标图像单元可配置为从目标视频中确定目标图像。In an exemplary embodiment, the
在示例性实施例中,色彩增强模块1250可包括第四增强单元、第五增强单元、第六增强单元和第七增强单元。其中,第四增强单元可配置为若目标视频中的目标图像的目标亮度等级包括第一亮度等级和第三亮度等级,则利用第四神经网络模型对目标视频中的视频帧进行色彩增强处理,其中第四神经网络模型是利用包括第一亮度等级和第三亮度等级的第四图像训练集训练获得的。第五增强单元可配置为若目标视频中的目标图像的目标亮度等级为第二亮度等级和第三亮度等级,则利用第五神经网络模型对目标视频中的视频帧进行色彩增强处理,其中第五神经网络模型是利用包括第二亮度等级和第三亮度等级的第四图像训练集训练获得的。第六增强单元可配置为若目标视频中的目标图像的目标亮度等级为第一亮度等级和第二亮度等级,则利用第六神经网络模型对目标视频中的视频帧进行色彩增强处理,其中第六神经网络模型是利用包括第一亮度等级和第二亮度等级的第六图像训练集训练获得的。第七增强单元可配置为若目标视频中的目标图像的目标亮度等级为第一亮度等级、第二亮度等级和第三亮度等级,则利用第七神经网络模型对目标视频中的视频帧进行色彩增强处理,其中第七神经网络模型是利用包括第一亮度等级、第二亮度等级和第三亮度等级的第七图像训练集训练获得的。In an exemplary embodiment, the
在示例性实施例中,目标视频单元可包括镜头检测子单元和目标视频子单元。其中,镜头检测子单元可配置为检测获得待处理视频中的镜头突变标识位。目标视频子单元可配置为根据镜头突变标识位分割待处理视频,获得至少一个目标视频。In an example embodiment, the target video unit may include a shot detection subunit and a target video subunit. The shot detection subunit may be configured to detect and obtain shot mutation flags in the video to be processed. The target video sub-unit may be configured to divide the video to be processed according to the shot mutation flag to obtain at least one target video.
在示例性实施例中,目标图像单元可配置为按照预设采样频率对目标视频的视频帧进行采样,获得至少一个目标图像。In an exemplary embodiment, the target image unit may be configured to sample video frames of the target video according to a preset sampling frequency to obtain at least one target image.
在示例性实施例中,灰度统计模块1230可包括直方图单元、第一统计单元和第二统计单元。其中,直方图单元可配置为对目标图像中各个像素点的灰度值进行灰度统计,获得目标图像的灰度直方图。第一统计单元可配置为根据灰度直方图的峰值确定目标图像中像素点数量最大的灰度值,作为目标图像的目标灰度值。第二统计单元可配置为根据目标图像中各个像素点的灰度值和目标图像的宽度值、高度值确定目标图像的灰度均值和灰度标准差。In an exemplary embodiment, the
图13示出了适于用来实现本公开实施例的电子设备的结构示意图。需要说明的是,图13示出的电子设备1300仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。FIG. 13 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure. It should be noted that the
如图13所示,电子设备1300包括中央处理单元(CPU)1301,其可以根据存储在只读存储器(ROM)1302中的程序或者从储存部分1308加载到随机访问存储器(RAM)1303中的程序而执行各种适当的动作和处理。在RAM 1303中,还存储有系统操作所需的各种程序和数据。CPU 1301、ROM 1302以及RAM 1303通过总线1304彼此相连。输入/输出(I/O)接口1305也连接至总线1304。As shown in FIG. 13 , the
以下部件连接至I/O接口1305:包括键盘、鼠标等的输入部分1306;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1307;包括硬盘等的储存部分1308;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1309。通信部分1309经由诸如因特网的网络执行通信处理。驱动器1310也根据需要连接至I/O接口1305。可拆卸介质1311,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1310上,以便于从其上读出的计算机程序根据需要被安装入储存部分1308。The following components are connected to the I/O interface 1305: an
特别地,根据本公开的实施例,下文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1309从网络上被下载和安装,和/或从可拆卸介质1313被安装。在该计算机程序被中央处理单元(CPU)1301执行时,执行本申请的系统中限定的各种功能。In particular, according to embodiments of the present disclosure, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有至少一个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having at least one wire, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable Read memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含至少一个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains at least one configurable function for implementing the specified logical function. Execute the instruction. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本公开实施例中所涉及到的模块和/或单元和/或子单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的模块和/或单元和/或子单元也可以设置在处理器中。其中,这些模块和/或单元和/或子单元的名称在某种情况下并不构成对该模块和/或单元和/或子单元本身的限定。The modules and/or units and/or sub-units described in the embodiments of the present disclosure may be implemented in software or in hardware. The described modules and/or units and/or sub-units It can also be set in the processor. Wherein, the names of these modules and/or units and/or sub-units do not constitute limitations on the modules and/or units and/or sub-units themselves under certain circumstances.
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现如下述实施例中所述的方法。例如,所述的电子设备可以实现如图2或图3或图4或图5或图6或图7或图8或图9所示的各个步骤。As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the electronic device described in the above embodiments; it may also exist alone without being assembled into the electronic device. middle. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by an electronic device, causes the electronic device to implement the methods described in the following embodiments. For example, the electronic device can implement the various steps shown in FIG. 2 or FIG. 3 or FIG. 4 or FIG. 5 or FIG. 6 or FIG. 7 or FIG. 8 or FIG. 9 .
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元或者子单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元或者子单元的特征和功能可以在一个模块或者单元或者子单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元或者子单元来具体化。It should be noted that although several modules or units or sub-units of the apparatus for action performance are mentioned in the above detailed description, this division is not mandatory. Indeed, according to embodiments of the present disclosure, the features and functions of two or more modules or units or sub-units described above may be embodied in one module or unit or sub-unit. Conversely, the features and functions of one module or unit described above may be further divided into multiple modules or units or sub-units to be embodied.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本公开实施方式的方法。From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein may be implemented by software, or may be implemented by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure may be embodied in the form of software products, and the software products may be stored in a non-volatile storage medium (which may be CD-ROM, U disk, mobile hard disk, etc.) or on the network , which includes several instructions to cause a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to an embodiment of the present disclosure.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that 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.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010910263.1ACN113409199B (en) | 2020-09-02 | 2020-09-02 | Image processing method, device, electronic equipment and computer readable medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010910263.1ACN113409199B (en) | 2020-09-02 | 2020-09-02 | Image processing method, device, electronic equipment and computer readable medium |
| Publication Number | Publication Date |
|---|---|
| CN113409199Atrue CN113409199A (en) | 2021-09-17 |
| CN113409199B CN113409199B (en) | 2025-07-25 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010910263.1AActiveCN113409199B (en) | 2020-09-02 | 2020-09-02 | Image processing method, device, electronic equipment and computer readable medium |
| Country | Link |
|---|---|
| CN (1) | CN113409199B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114510989A (en)* | 2021-12-23 | 2022-05-17 | 中国科学院软件研究所 | Normative evaluation method, apparatus and device for image dataset |
| CN114894444A (en)* | 2022-05-09 | 2022-08-12 | 深圳市汇顶科技股份有限公司 | Screen light leakage and ambient light detection method and device and electronic equipment |
| CN115147780A (en)* | 2022-07-21 | 2022-10-04 | 深圳供电局有限公司 | Infrared image identification method for cable accessory |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2010015140A1 (en)* | 2008-08-07 | 2010-02-11 | 中兴通讯股份有限公司 | Video enhancing method and device thereof |
| CN102202163A (en)* | 2011-05-13 | 2011-09-28 | 成都西图科技有限公司 | Adaptive enhancement method and device for monitored video |
| CN104915934A (en)* | 2015-06-15 | 2015-09-16 | 电子科技大学 | Grayscale image enhancement method based on retina mechanism |
| CN105049743A (en)* | 2015-08-21 | 2015-11-11 | 宇龙计算机通信科技(深圳)有限公司 | Backlight testing method, backlight testing system, picture taking device and terminal |
| CN109191395A (en)* | 2018-08-21 | 2019-01-11 | 深圳创维-Rgb电子有限公司 | Method for enhancing picture contrast, device, equipment and storage medium |
| CN109785240A (en)* | 2017-11-13 | 2019-05-21 | 中国移动通信有限公司研究院 | A kind of enhancement method of low-illumination image, device and image processing equipment |
| CN109801240A (en)* | 2019-01-15 | 2019-05-24 | 武汉鸿瑞达信息技术有限公司 | A kind of image enchancing method and image intensifier device |
| CN110197470A (en)* | 2019-06-27 | 2019-09-03 | 北京金山云网络技术有限公司 | Image processing method, device, electronic equipment and computer readable storage medium |
| CN110276733A (en)* | 2019-06-21 | 2019-09-24 | 合肥工业大学 | A Color Image Enhancement Method Based on FPGA |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2010015140A1 (en)* | 2008-08-07 | 2010-02-11 | 中兴通讯股份有限公司 | Video enhancing method and device thereof |
| CN102202163A (en)* | 2011-05-13 | 2011-09-28 | 成都西图科技有限公司 | Adaptive enhancement method and device for monitored video |
| CN104915934A (en)* | 2015-06-15 | 2015-09-16 | 电子科技大学 | Grayscale image enhancement method based on retina mechanism |
| CN105049743A (en)* | 2015-08-21 | 2015-11-11 | 宇龙计算机通信科技(深圳)有限公司 | Backlight testing method, backlight testing system, picture taking device and terminal |
| CN109785240A (en)* | 2017-11-13 | 2019-05-21 | 中国移动通信有限公司研究院 | A kind of enhancement method of low-illumination image, device and image processing equipment |
| CN109191395A (en)* | 2018-08-21 | 2019-01-11 | 深圳创维-Rgb电子有限公司 | Method for enhancing picture contrast, device, equipment and storage medium |
| CN109801240A (en)* | 2019-01-15 | 2019-05-24 | 武汉鸿瑞达信息技术有限公司 | A kind of image enchancing method and image intensifier device |
| CN110276733A (en)* | 2019-06-21 | 2019-09-24 | 合肥工业大学 | A Color Image Enhancement Method Based on FPGA |
| CN110197470A (en)* | 2019-06-27 | 2019-09-03 | 北京金山云网络技术有限公司 | Image processing method, device, electronic equipment and computer readable storage medium |
| Title |
|---|
| WENJIE XU ET AL.: "Deep Residual Convolutional Network for Natural Image Denoising and Brightness Enhancement", 《2018 INTERNATIONAL CONFERENCE ON PLATFORM TECHNOLOGY AND SERVICE (PLATCON)》, 27 September 2018 (2018-09-27)* |
| 李忠海 等: "基于Retinex算法的亮度分层图像增强算法", 《数据采集与处理》, vol. 34, no. 1, 31 January 2019 (2019-01-31)* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114510989A (en)* | 2021-12-23 | 2022-05-17 | 中国科学院软件研究所 | Normative evaluation method, apparatus and device for image dataset |
| CN114510989B (en)* | 2021-12-23 | 2022-10-25 | 中国科学院软件研究所 | Normative evaluation method, apparatus and device for image dataset |
| CN114894444A (en)* | 2022-05-09 | 2022-08-12 | 深圳市汇顶科技股份有限公司 | Screen light leakage and ambient light detection method and device and electronic equipment |
| US12241778B2 (en) | 2022-05-09 | 2025-03-04 | Shenzhen GOODIX Technology Co., Ltd. | Method for detecting light leakage of screen, method for detecting ambient light, and apparatus for detecting ambient light |
| CN115147780A (en)* | 2022-07-21 | 2022-10-04 | 深圳供电局有限公司 | Infrared image identification method for cable accessory |
| Publication number | Publication date |
|---|---|
| CN113409199B (en) | 2025-07-25 |
| Publication | Publication Date | Title |
|---|---|---|
| CN112069977B (en) | Image processing method, device, electronic equipment and computer readable medium | |
| CN112954450B (en) | Video processing method, apparatus, electronic device and storage medium | |
| CN114584849A (en) | Video quality evaluation method and device, electronic equipment and computer storage medium | |
| US20240013359A1 (en) | Image processing method, model training method, apparatus, medium and device | |
| CN113409199B (en) | Image processing method, device, electronic equipment and computer readable medium | |
| CN112839223B (en) | Image compression method, image compression device, storage medium and electronic equipment | |
| CN115022679B (en) | Video processing method, device, electronic device and medium | |
| CN108985201A (en) | Image processing method, medium, device and calculating equipment | |
| US20240127406A1 (en) | Image quality adjustment method and apparatus, device, and medium | |
| CN113657518A (en) | Training method, target image detection method, device, electronic device and medium | |
| WO2020108060A1 (en) | Video processing method and apparatus, and electronic device and storage medium | |
| CN114037716A (en) | Image segmentation method, device, equipment and storage medium | |
| CN111523400B (en) | Video representative frame extraction method and device | |
| CN111899239A (en) | Image processing method and device | |
| US10764578B2 (en) | Bit rate optimization system and method | |
| CN112312200A (en) | Video cover generation method and device and electronic equipment | |
| CN114973293B (en) | Similarity judging method, key frame extracting method and device, medium and equipment | |
| CN113628192B (en) | Image blur detection method, device, equipment, storage medium and program product | |
| HK40051854A (en) | Image processing method, device, electronic equipment and computer readable medium | |
| CN113762016A (en) | Key frame selection method and device | |
| CN113763258A (en) | Beautifying method and device for video image | |
| HK40036254A (en) | Image processing method and apparatus, electronic device and computer readable medium | |
| CN116152233B (en) | Image processing method, intelligent terminal and storage medium | |
| CN118784626B (en) | Security monitoring video transmission method, device, equipment and computer readable medium | |
| US20250139749A1 (en) | Range adaptive dynamic metadata generation for high dynamic range images |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| REG | Reference to a national code | Ref country code:HK Ref legal event code:DE Ref document number:40051854 Country of ref document:HK | |
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |