CN116309634A - Image processing method, device, terminal equipment, storage medium and program product - Google Patents
Image processing method, device, terminal equipment, storage medium and program product Download PDFInfo
- Publication number
- CN116309634A CN116309634A CN202310104869.XA CN202310104869A CN116309634A CN 116309634 A CN116309634 A CN 116309634A CN 202310104869 A CN202310104869 A CN 202310104869A CN 116309634 A CN116309634 A CN 116309634A
- Authority
- CN
- China
- Prior art keywords
- image
- partition
- image processing
- mapping
- processed
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本申请涉及图像处理领域,尤其涉及一种图像处理方法、装置、终端设备、存储介质及程序产品。The present application relates to the field of image processing, and in particular to an image processing method, device, terminal equipment, storage medium and program product.
背景技术Background technique
现有终端设备的图像信号处理器(image s igna l processor,ISP)通常都用于输出对人眼来说视觉效果更好的图像。但这种对于人眼来说视觉效果好的图像,可能并不适合于目标检测,例如车辆检测或者行人检测等等。因此在现有的图像信号处理器的基础上,需要设计一种图像处理方法以获得适合进行目标检测的图像。An image signal processor (image signal processor, ISP) of an existing terminal device is generally used to output images with better visual effects for human eyes. However, this kind of image with good visual effect for human eyes may not be suitable for target detection, such as vehicle detection or pedestrian detection. Therefore, based on the existing image signal processor, it is necessary to design an image processing method to obtain an image suitable for target detection.
现有技术的图像处理方法在进行图像处理时或难以保留准确的图像细节,或方法实现比较复杂、计算量较大、执行效率较低,因此,如何在保留准确的图像细节的同时,简化图像处理流程,降低计算量,提高执行效率,成为本领域的研究热点。The image processing methods in the prior art are either difficult to retain accurate image details during image processing, or the implementation of the method is relatively complex, the amount of calculation is large, and the execution efficiency is low. Therefore, how to simplify the image while retaining accurate image details Processing flow, reducing the amount of calculation, and improving execution efficiency have become research hotspots in this field.
发明内容Contents of the invention
有鉴于此,提出了一种图像处理方法、装置、终端设备、存储介质及程序产品,根据本申请实施例的图像处理方法,在保留准确的图像细节的同时,能够简化图像处理流程,降低计算量,提高执行效率。In view of this, an image processing method, device, terminal equipment, storage medium, and program product are proposed. According to the image processing method of the embodiment of the present application, while retaining accurate image details, the image processing flow can be simplified, and the computation time can be reduced. volume and improve execution efficiency.
第一方面,本申请的实施例提供了一种图像处理方法,所述方法应用于终端设备上的第一图像处理模型,所述方法包括:基于分区参数将待处理图像拆分成多个分区,所述分区参数指示每个分区的大小;针对每个分区进行直方图统计,得到每个分区对应的直方图;根据映射参数查找表和所述每个分区对应的直方图,确定每个分区对应的映射参数;使用所述映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像。In the first aspect, the embodiment of the present application provides an image processing method, the method is applied to the first image processing model on the terminal device, and the method includes: splitting the image to be processed into multiple partitions based on partition parameters , the partition parameter indicates the size of each partition; perform histogram statistics for each partition to obtain the histogram corresponding to each partition; determine each partition according to the mapping parameter lookup table and the histogram corresponding to each partition Corresponding mapping parameters; using the mapping parameters to adjust the pixel values of the corresponding partitions in the image to be processed to obtain a processed image.
根据本申请实施例的图像处理方法,基于分区参数将待处理图像拆分成多个分区,分区参数指示每个分区的大小,使得通过分区参数可以有效提高第一图像处理模型整体的感受野,同时控制后续的计算量,提高图像处理效率;针对每个分区进行直方图统计,得到每个分区对应的直方图,根据映射参数查找表和每个分区对应的直方图,确定每个分区对应的映射参数,使得确定映射参数的耗时大大降低,通过降低时延进一步提升图像处理效率;使用映射参数调整待处理图像中对应的分区的像素值可以得到处理后的图像,其中映射参数是与分区一一对应,因此可以提高图像处理效果,使得处理后的图像与场景更适应。在此情况下,根据本申请实施例的图像处理方法,在保留准确的图像细节的同时,能够简化图像处理流程,降低计算量,提高执行效率。According to the image processing method of the embodiment of the present application, the image to be processed is split into multiple partitions based on the partition parameter, and the partition parameter indicates the size of each partition, so that the overall receptive field of the first image processing model can be effectively improved through the partition parameter, At the same time control the amount of follow-up calculations and improve image processing efficiency; perform histogram statistics for each partition to obtain the histogram corresponding to each partition, and determine the corresponding histogram of each partition according to the mapping parameter lookup table and the histogram corresponding to each partition The mapping parameters greatly reduce the time-consuming of determining the mapping parameters, and further improve the image processing efficiency by reducing the delay; the processed image can be obtained by adjusting the pixel values of the corresponding partitions in the image to be processed by using the mapping parameters, where the mapping parameters are related to the partition One-to-one correspondence, so the image processing effect can be improved, making the processed image more adaptable to the scene. In this case, according to the image processing method of the embodiment of the present application, while retaining accurate image details, the image processing process can be simplified, the amount of calculation can be reduced, and the execution efficiency can be improved.
根据第一方面,在所述图像处理方法的第一种可能的实现方式中,所述直方图的横坐标为预设的多个像素值区间,所述直方图的纵坐标为像素数;所述根据映射参数查找表和所述每个分区对应的直方图,确定每个分区对应的映射参数,包括:针对任意一个分区,根据该分区对应的直方图包括的每个像素值区间的像素数,得到该分区对应的特征向量;在所述映射参数查找表中找到与所述特征向量匹配的一组映射参数,作为该分区对应的映射参数。According to the first aspect, in the first possible implementation of the image processing method, the abscissa of the histogram is a plurality of preset pixel value intervals, and the ordinate of the histogram is the number of pixels; According to the mapping parameter lookup table and the histogram corresponding to each partition, determine the mapping parameters corresponding to each partition, including: for any partition, according to the number of pixels in each pixel value interval included in the histogram corresponding to the partition , to obtain the feature vector corresponding to the partition; find a set of mapping parameters matching the feature vector in the mapping parameter lookup table as the mapping parameter corresponding to the partition.
通过这种方式,可以完成每个分区对应的映射参数的确定。在已有映射参数查找表的情况下,可以不采用模型计算的方式确定映射参数,从而降低数据处理成本。In this way, the determination of the mapping parameters corresponding to each partition can be completed. In the case of an existing mapping parameter lookup table, the mapping parameters can be determined without model calculation, thereby reducing data processing costs.
根据第一方面的第一种可能的实现方式,在所述图像处理方法的第二种可能的实现方式中,所述一组映射参数包括与待处理图像到处理后的图像的映射曲线的切线的斜率相对应的第一映射参数以及与所述映射曲线的切线的截距相对应的第二映射参数。According to the first possible implementation of the first aspect, in the second possible implementation of the image processing method, the set of mapping parameters includes a tangent to a mapping curve from the image to be processed to the processed image The first mapping parameter corresponding to the slope of the mapping curve and the second mapping parameter corresponding to the intercept of the tangent of the mapping curve.
通过以与切线的斜率和截距对应的一组映射参数代替完整映射曲线,可以大大降低计算量,提高执行效率。By replacing the complete mapping curve with a set of mapping parameters corresponding to the slope and intercept of the tangent, the amount of calculation can be greatly reduced and the execution efficiency can be improved.
根据第一方面的第二种可能的实现方式,在所述图像处理方法的第三种可能的实现方式中,所述使用所述映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像,包括:针对任意一个分区中的任意一个像素,确定该分区对应的第一映射参数和该像素的像素值的乘积;根据所述乘积和该分区对应的第二映射参数之和,得到处理后的图像中的该像素的像素值。According to the second possible implementation of the first aspect, in the third possible implementation of the image processing method, the use of the mapping parameters to adjust the pixel values of the corresponding partitions in the image to be processed is obtained by processing The final image includes: for any pixel in any partition, determine the product of the first mapping parameter corresponding to the partition and the pixel value of the pixel; according to the sum of the product and the second mapping parameter corresponding to the partition, Get the pixel value of the pixel in the processed image.
通过这种方式,使得基于映射参数进行图像的像素值调整时,实际上可以是简单的一次函数的映射,只需极少量的计算,即可实现快速、有效的像素值调整。In this way, the pixel value adjustment of the image based on the mapping parameters can actually be a simple linear function mapping, and only a small amount of calculation is required to achieve fast and effective pixel value adjustment.
根据第一方面,或以上第一方面的任意一种可能的实现方式,在所述图像处理方法的第四种可能的实现方式中,所述方法还包括:基于分区参数构建多个样本特征向量,每个样本特征向量对应样本直方图的每个像素值区间的像素数在该分区参数下的所有组合;将所述多个样本特征向量分别输入所述映射参数预测模型,所述映射参数预测模型输出每个样本特征向量对应的映射参数;根据所述多个样本特征向量和每个样本特征向量对应的映射参数生成所述映射参数查找表,所述映射参数查找表记录每个样本特征向量及其对应的一组映射参数。According to the first aspect, or any possible implementation of the above first aspect, in the fourth possible implementation of the image processing method, the method further includes: constructing multiple sample feature vectors based on partition parameters , each sample feature vector corresponds to all combinations of the number of pixels in each pixel value interval of the sample histogram under the partition parameter; the multiple sample feature vectors are respectively input into the mapping parameter prediction model, and the mapping parameter prediction The model outputs the mapping parameters corresponding to each sample feature vector; the mapping parameter lookup table is generated according to the plurality of sample feature vectors and the mapping parameters corresponding to each sample feature vector, and the mapping parameter lookup table records each sample feature vector and its corresponding set of mapping parameters.
通过这种方式得到映射参数查找表后,在终端设备获取到待处理图像时,便无需再经过映射参数预测模型进行计算,从而有效减少了计算量。After the mapping parameter lookup table is obtained in this way, when the terminal device obtains the image to be processed, it does not need to go through the mapping parameter prediction model for calculation, thereby effectively reducing the amount of calculation.
根据第一方面的第四种可能的实现方式,在所述图像处理方法的第五种可能的实现方式中,所述映射参数预测模型的感受野的数值小于第一阈值。According to the fourth possible implementation manner of the first aspect, in the fifth possible implementation manner of the image processing method, the value of the receptive field of the mapping parameter prediction model is smaller than the first threshold.
通过这种方式,可以提升映射参数查找表的生成效率,并保证映射参数查找表的准确度。In this way, the generation efficiency of the mapping parameter lookup table can be improved, and the accuracy of the mapping parameter lookup table can be guaranteed.
根据第一方面的第五种可能的实现方式,在所述图像处理方法的第六种可能的实现方式中,所述终端设备上还包括第二图像处理模型,所述第二图像处理模型包括至少一层,每层包括至少一个第一图像处理模型,所述第二图像处理模型包括多层时,各层之间串联;每层包括多个第一图像处理模型时,各第一图像处理模型之间并联,同一层的各第一图像处理模型的分区参数不同。According to the fifth possible implementation manner of the first aspect, in the sixth possible implementation manner of the image processing method, the terminal device further includes a second image processing model, and the second image processing model includes At least one layer, each layer includes at least one first image processing model, when the second image processing model includes multiple layers, each layer is connected in series; when each layer includes multiple first image processing models, each first image processing model The models are connected in parallel, and the partition parameters of the first image processing models in the same layer are different.
通过并联通路提升感受野,通过串联通路加强各分区的交互,可以提升图像处理效果。Improving the receptive field through parallel paths and strengthening the interaction of each partition through series paths can improve the image processing effect.
根据第一方面的第六种可能的实现方式,在所述图像处理方法的第七种可能的实现方式中,针对所述第二图像处理模型的任意一层,该层包括一个第一图像处理模型时,该第一图像处理模型得到的处理后的图像作为下一层的第一图像处理模型的待处理图像,该层包括多个第一图像处理模型时,该多个第一图像处理模型得到的处理后的图像的均值作为下一层的第一图像处理模型的待处理图像。According to the sixth possible implementation of the first aspect, in the seventh possible implementation of the image processing method, for any layer of the second image processing model, the layer includes a first image processing model, the processed image obtained by the first image processing model is used as the image to be processed by the first image processing model of the next layer, and when the layer includes multiple first image processing models, the multiple first image processing models The obtained mean value of the processed image is used as the image to be processed by the first image processing model of the next layer.
通过这种方式,可以保证第二图像处理模型的图像处理效果可以逐层递进。In this way, it can be ensured that the image processing effect of the second image processing model can be progressive layer by layer.
第二方面,本申请的实施例提供了一种图像处理装置,所述装置应用于终端设备上的第一图像处理模型,所述装置包括:拆分模块,用于基于分区参数将待处理图像拆分成多个分区,所述分区参数指示每个分区的大小;统计模块,用于针对每个分区进行直方图统计,得到每个分区对应的直方图;预测模块,用于根据映射参数查找表和所述每个分区对应的直方图,确定每个分区对应的映射参数;映射模块,用于使用所述映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像。In the second aspect, the embodiment of the present application provides an image processing device, the device is applied to the first image processing model on the terminal device, and the device includes: a splitting module, which is used to split the image to be processed based on the partition parameters Split into multiple partitions, the partition parameters indicate the size of each partition; the statistics module is used to perform histogram statistics for each partition, and obtain the histogram corresponding to each partition; the prediction module is used to search according to the mapping parameters The table and the histogram corresponding to each partition determine the mapping parameters corresponding to each partition; the mapping module is used to use the mapping parameters to adjust the pixel values of the corresponding partitions in the image to be processed to obtain the processed image.
根据第二方面,在所述图像处理装置的第一种可能的实现方式中,所述直方图的横坐标为预设的多个像素值区间,所述直方图的纵坐标为像素数;所述根据映射参数查找表和所述每个分区对应的直方图,确定每个分区对应的映射参数,包括:针对任意一个分区,根据该分区对应的直方图包括的每个像素值区间的像素数,得到该分区对应的特征向量;在所述映射参数查找表中找到与所述特征向量匹配的一组映射参数,作为该分区对应的映射参数。According to the second aspect, in the first possible implementation of the image processing device, the abscissa of the histogram is a plurality of preset pixel value intervals, and the ordinate of the histogram is the number of pixels; According to the mapping parameter lookup table and the histogram corresponding to each partition, determine the mapping parameters corresponding to each partition, including: for any partition, according to the number of pixels in each pixel value interval included in the histogram corresponding to the partition , to obtain the feature vector corresponding to the partition; find a set of mapping parameters matching the feature vector in the mapping parameter lookup table as the mapping parameter corresponding to the partition.
根据第二方面的第一种可能的实现方式,在所述图像处理装置的第二种可能的实现方式中,所述一组映射参数包括与待处理图像到处理后的图像的映射曲线的切线的斜率相对应的第一映射参数以及与所述映射曲线的切线的截距相对应的第二映射参数。According to the first possible implementation of the second aspect, in the second possible implementation of the image processing device, the set of mapping parameters includes a tangent to a mapping curve from the image to be processed to the processed image The first mapping parameter corresponding to the slope of the mapping curve and the second mapping parameter corresponding to the intercept of the tangent of the mapping curve.
根据第二方面的第二种可能的实现方式,在所述图像处理装置的第三种可能的实现方式中,所述使用所述映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像,包括:针对任意一个分区中的任意一个像素,确定该分区对应的第一映射参数和该像素的像素值的乘积;根据所述乘积和该分区对应的第二映射参数之和,得到处理后的图像中的该像素的像素值。According to the second possible implementation of the second aspect, in the third possible implementation of the image processing device, the adjustment of the pixel value of the corresponding partition in the image to be processed by using the mapping parameters is processed The final image includes: for any pixel in any partition, determine the product of the first mapping parameter corresponding to the partition and the pixel value of the pixel; according to the sum of the product and the second mapping parameter corresponding to the partition, Get the pixel value of the pixel in the processed image.
根据第二方面,或以上第二方面的任意一种可能的实现方式,在所述图像处理装置的第四种可能的实现方式中,所述装置还包括:构建模块,用于基于分区参数构建多个样本特征向量,每个样本特征向量对应样本直方图的每个像素值区间的像素数在该分区参数下的所有组合;输入模块,用于将所述多个样本特征向量分别输入所述映射参数预测模型,所述映射参数预测模型输出每个样本特征向量对应的映射参数;生成模块,用于根据所述多个样本特征向量和每个样本特征向量对应的映射参数生成所述映射参数查找表,所述映射参数查找表记录每个样本特征向量及其对应的一组映射参数。According to the second aspect, or any possible implementation of the above second aspect, in the fourth possible implementation of the image processing device, the device further includes: a construction module, configured to construct A plurality of sample feature vectors, each sample feature vector corresponds to all combinations of the number of pixels in each pixel value interval of the sample histogram under the partition parameter; the input module is used to input the multiple sample feature vectors into the A mapping parameter prediction model, wherein the mapping parameter prediction model outputs mapping parameters corresponding to each sample feature vector; a generating module configured to generate the mapping parameters according to the multiple sample feature vectors and the mapping parameters corresponding to each sample feature vector A lookup table, the mapping parameter lookup table records each sample feature vector and its corresponding set of mapping parameters.
根据第二方面的第四种可能的实现方式,在所述图像处理装置的第五种可能的实现方式中,所述映射参数预测模型的感受野的数值小于第一阈值。According to a fourth possible implementation manner of the second aspect, in a fifth possible implementation manner of the image processing apparatus, a value of a receptive field of the mapping parameter prediction model is smaller than a first threshold.
根据第二方面的第五种可能的实现方式,在所述图像处理装置的第六种可能的实现方式中,所述终端设备上还包括第二图像处理模型,所述第二图像处理模型包括至少一层,每层包括至少一个第一图像处理模型,所述第二图像处理模型包括多层时,各层之间串联;每层包括多个第一图像处理模型时,各第一图像处理模型之间并联,同一层的各第一图像处理模型的分区参数不同。According to the fifth possible implementation manner of the second aspect, in the sixth possible implementation manner of the image processing apparatus, the terminal device further includes a second image processing model, and the second image processing model includes At least one layer, each layer includes at least one first image processing model, when the second image processing model includes multiple layers, each layer is connected in series; when each layer includes multiple first image processing models, each first image processing model The models are connected in parallel, and the partition parameters of the first image processing models in the same layer are different.
根据第二方面的第六种可能的实现方式,在所述图像处理装置的第七种可能的实现方式中,针对所述第二图像处理模型的任意一层,该层包括一个第一图像处理模型时,该第一图像处理模型得到的处理后的图像作为下一层的第一图像处理模型的待处理图像,该层包括多个第一图像处理模型时,该多个第一图像处理模型得到的处理后的图像的均值作为下一层的第一图像处理模型的待处理图像。According to the sixth possible implementation of the second aspect, in the seventh possible implementation of the image processing device, for any layer of the second image processing model, the layer includes a first image processing model, the processed image obtained by the first image processing model is used as the image to be processed by the first image processing model of the next layer, and when the layer includes multiple first image processing models, the multiple first image processing models The obtained mean value of the processed image is used as the image to be processed by the first image processing model of the next layer.
第三方面,本申请的实施例提供了一种终端设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的图像处理方法。In a third aspect, an embodiment of the present application provides a terminal device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the above-mentioned first An image processing method in one or several possible implementations of the first aspect or the first aspect.
第四方面,本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的图像处理方法。In the fourth aspect, the embodiments of the present application provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned first aspect or the first aspect can be realized One or several image processing methods in various possible implementations.
第五方面,本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的图像处理方法。In the fifth aspect, the embodiments of the present application provide a computer program product, including computer readable code, or a non-volatile computer readable storage medium bearing computer readable code, when the computer readable code is stored in an electronic When running in the device, the processor in the electronic device executes the image processing method of the first aspect or one or more of the multiple possible implementations of the first aspect.
本申请的这些和其他方面在以下(多个)实施例的描述中会更加简明易懂。These and other aspects of the present application will be made more apparent in the following description of the embodiment(s).
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the specification, serve to explain the principles of the application.
图1示出原始图像以及经现有技术的图像信号处理器处理得到的增强图像在用于目标检测时的目标检测效果。FIG. 1 shows the target detection effect of the original image and the enhanced image processed by the image signal processor in the prior art when used for target detection.
图2示出原始图像以及经现有技术的图像信号处理器处理得到的图像的示例。FIG. 2 shows an example of an original image and an image processed by an image signal processor in the prior art.
图3示出根据本申请实施例的图像处理方法的示例性应用场景。Fig. 3 shows an exemplary application scenario of the image processing method according to the embodiment of the present application.
图4示出根据本申请实施例的图像处理方法的流程图。Fig. 4 shows a flowchart of an image processing method according to an embodiment of the present application.
图5示出根据本申请实施例的第一图像处理模型的示例性结构。Fig. 5 shows an exemplary structure of a first image processing model according to an embodiment of the present application.
图6示出根据本申请实施例的映射参数预测模块300的一种示例性工作方式。Fig. 6 shows an exemplary working manner of the mapping
图7示出根据本申请实施例的第二图像处理模型的示例性结构。Fig. 7 shows an exemplary structure of a second image processing model according to an embodiment of the present application.
图8示出根据本申请实施例得到的处理后的图像的目标检测结果以及现有技术得到的图像的目标检测结果的对比。FIG. 8 shows a comparison between the target detection results of the processed image obtained according to the embodiment of the present application and the target detection results of the image obtained by the prior art.
图9出根据本申请实施例得到的处理后的图像的目标检测结果以及现有技术得到的图像的目标检测结果的对比。FIG. 9 shows a comparison between the object detection results of the processed image obtained according to the embodiment of the present application and the object detection results of the image obtained by the prior art.
图10示出根据本申请实施例得到的处理后的图像的目标检测结果以及现有技术得到的图像的目标检测结果的对比。FIG. 10 shows a comparison between the target detection results of the processed images obtained according to the embodiment of the present application and the target detection results of the images obtained in the prior art.
图11示出根据本申请实施例得到的处理后的图像的目标检测结果以及现有技术得到的图像的目标检测结果的对比。FIG. 11 shows a comparison between the target detection results of the processed image obtained according to the embodiment of the present application and the target detection results of the image obtained by the prior art.
图12示出根据本申请实施例得到的处理后的图像的目标检测结果以及现有技术得到的图像的目标检测结果的对比。FIG. 12 shows a comparison between the object detection results of the processed image obtained according to the embodiment of the present application and the object detection results of the image obtained by the prior art.
图13示出根据本申请实施例的图像处理装置的示例性结构图。FIG. 13 shows an exemplary structural diagram of an image processing device according to an embodiment of the present application.
图14示出根据本申请实施例的终端设备的示例性结构图。Fig. 14 shows an exemplary structural diagram of a terminal device according to an embodiment of the present application.
具体实施方式Detailed ways
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。In addition, in order to better illustrate the present application, numerous specific details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present application may be practiced without certain of the specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail in order to highlight the gist of the present application.
下面介绍本文中可能出现的术语。Terms that may appear in this article are described below.
神经网络(neura l network,NN):一种模仿生物神经网络的结构和功能的计算模型,多用于人工智能领域。通过对网络结构的不同设计、使用不同的训练数据等方法,神经网络可以实现多种功能。Neural network (neural network, NN): a computational model that imitates the structure and function of biological neural networks, and is mostly used in the field of artificial intelligence. By designing different network structures and using different training data, neural networks can achieve various functions.
图像信号处理器(image s igna l processor,ISP):搭载于相机或其他设置有图像传感器的终端设备上的处理单元,用于将图像传感器捕获的光电信号转换为三通道RGB图像。图像信号处理器包含多个子模块,各子模块通常采用传统算法(非神经网络算法)、或采用传统算法与神经网络算法结合、或采用纯神经网络算法实现。Image signal processor (image signal processor, ISP): a processing unit mounted on a camera or other terminal equipment equipped with an image sensor, used to convert the photoelectric signal captured by the image sensor into a three-channel RGB image. The image signal processor includes multiple sub-modules, and each sub-module is usually realized by using a traditional algorithm (non-neural network algorithm), or a combination of a traditional algorithm and a neural network algorithm, or a pure neural network algorithm.
全类平均正确率(mean average preci s ion,mAP):一个表示模型检测精度的指标,一般为各类别正确率的平均值。全类平均正确率越高,代表模型的检测精度越高。Mean average precision (mAP) of all classes (mean average precision, mAP): an indicator indicating the accuracy of model detection, generally the average of the accuracy of each category. The higher the average correct rate of the whole class, the higher the detection accuracy of the model.
峰值信噪比(peak s igna l-to-noi se rat io,PSNR):在本领域作为衡量被测图像和真值图像的相似程度的指标之一。该指标只关注图像的像素值,而忽略图像的结构、纹理信息。一般而言,峰值信噪比越高,表征被测图像与真值图像的像素值越接近。Peak signal-to-noise ratio (peak signal-to-noise ratio, PSNR): In this field, it is used as one of the indicators to measure the similarity between the tested image and the real image. This indicator only pays attention to the pixel value of the image, but ignores the structure and texture information of the image. Generally speaking, the higher the peak signal-to-noise ratio, the closer the pixel values representing the tested image and the real image are.
结构相似性(structure s imi l ar ity,SSIM):在本领域作为衡量被测图像和真值图像的相似程度的指标之一。该指标同时关注图像的亮度、对比度与结构信息。一般而言,结构相似性越高,表征被测图像与真值图像的亮度、对比度与结构信息越接近。Structural similarity (structure similarity, SSIM): In this field, it is used as one of the indicators to measure the similarity between the tested image and the real image. This indicator pays attention to the brightness, contrast and structural information of the image at the same time. Generally speaking, the higher the structural similarity, the closer the brightness, contrast and structural information representing the tested image and the real image are.
直方图:对图像的像素值分布的一种表示。输入一张图像,假设图像的像素值范围为0-1,根据该像素值范围设置多个长度相等的像素值区间,统计图像中在不同像素值区间的像素的个数。直方图一般以柱状图的形式呈现。Histogram: A representation of the distribution of pixel values in an image. Input an image, assuming that the pixel value range of the image is 0-1, set multiple pixel value intervals of equal length according to the pixel value range, and count the number of pixels in different pixel value intervals in the image. A histogram is generally presented in the form of a histogram.
感受野(recept ive fie ld):在深度神经网络领域的一个术语,用来表示神经网络内部的不同位置的神经元对原图像的感受范围的大小。神经元感受野的值越大,表示其能接触到的原始图像范围越大,也意味着该神经元可能蕴含更为全局、语义层次更高的特征;而神经元感受野的值越小,则表示其包含的特征越趋向于局部和细节。感受野的值可以大致用来判断神经网络的每一层的抽象层次。Receptive field (receptive field): A term in the field of deep neural networks, used to indicate the size of the sensory range of neurons at different positions within the neural network to the original image. The larger the value of the neuron's receptive field, the larger the range of the original image it can touch, and it also means that the neuron may contain more global and higher semantic features; while the smaller the value of the neuron's receptive field, It means that the features it contains tend to be more local and detailed. The value of the receptive field can be roughly used to judge the abstraction level of each layer of the neural network.
图像(质量)增强:指对图像的亮度、颜色、对比度、饱和度、动态范围等进行处理,使得图像的人眼感官效果或某种指标更好的技术。本文中图像增强和图像质量增强表述的是同一概念。Image (quality) enhancement: refers to the technology of processing the brightness, color, contrast, saturation, dynamic range, etc. of the image to make the human eye sensory effect or certain indicators of the image better. In this paper, image enhancement and image quality enhancement express the same concept.
随着神经网络技术的迭代更新,基于深度学习神经网络的图像信号处理方法在图像信号处理领域取得了长足的发展。在现有的终端设备上,如手机、平板电脑、监控摄像头等,大都采用基于深度学习神经网络的图像信号处理方法实现全部或部分的图像信号处理器。经过开发者的多轮调优,这些基于神经网络的图像信号处理器可以输出非常高质量的增强图像,增强图像的颜色与对比度等与人眼视觉效果已经非常接近。With the iterative update of neural network technology, the image signal processing method based on deep learning neural network has made great progress in the field of image signal processing. On existing terminal devices, such as mobile phones, tablet computers, surveillance cameras, etc., most of the image signal processing methods based on deep learning neural networks are used to realize all or part of the image signal processor. After multiple rounds of tuning by developers, these neural network-based image signal processors can output very high-quality enhanced images, and the color and contrast of the enhanced images are very close to the visual effects of the human eye.
然而,一些终端设备上,图像信号处理器输出的增强图像可能并不用于展示给用户,而是用于进行目标检测,例如对于具备自动驾驶功能的车辆等,其上搭载的图像信号处理器输出的图像可主要用于车辆或者行人的检测。一张人眼视觉效果更好的增强图像并不意味着目标检测精度也更高。图1示出原始图像以及经现有技术的图像信号处理器处理得到的增强图像在用于目标检测时的目标检测效果。However, on some terminal devices, the enhanced image output by the image signal processor may not be used for display to the user, but for target detection. The images can be mainly used for vehicle or pedestrian detection. An enhanced image with better human vision does not mean higher object detection accuracy. FIG. 1 shows the target detection effect of the original image and the enhanced image processed by the image signal processor in the prior art when used for target detection.
如图1所示,左侧为经过图像信号处理器处理的、人眼视觉效果提升的增强图像,右侧为原始图像。其中左侧图像的亮度和对比度都更高。将两张图像分别送入同一个目标检测模型(未示出)时,可以看出目标检测模型反而无法检测亮度、对比度更高的图像中的行人。这也说明对于人眼来说视觉效果好的图像,可能并不适合于目标检测。As shown in Figure 1, the left side is the enhanced image processed by the image signal processor and the human visual effect is improved, and the right side is the original image. The image on the left has higher brightness and contrast. When the two images are sent to the same object detection model (not shown), it can be seen that the object detection model cannot detect pedestrians in images with higher brightness and contrast. This also shows that images with good visual effects for human eyes may not be suitable for target detection.
此外,深度学习神经网络的性能通常与复杂程度正相关,即想要得到质量更高的图像时,神经网络模型通常需要设计的比较复杂,导致图像信号处理器的复杂程度也提高。图2示出原始图像以及经现有技术的图像信号处理器处理得到的图像的示例。如图2所示,左上角为原始图像,右下角为真值图像,右上角为应用简单的神经网络模型(计算量=27.8*10^9次的浮点运算数/秒(giga f loat ing-point operat ions per second,GFLOPS))的图像信号处理器输出的增强图像1,峰值信噪比PSNR和结构相似性SSIM分别为26.22和0.9773;左下角为应用复杂的神经网络模型(计算量=4956*10^9次的浮点运算数/秒)的图像信号处理器输出的增强图像2,峰值信噪比PSNR和结构相似性SSIM分别为34.95和0.9976。可以看到,复杂的神经网络模型输出的图像与真值图像更加接近,原因在于该图像的峰值信噪比PSNR和结构相似性SSIM更高,同时图像亮度、对比度与真值图像更加接近。In addition, the performance of the deep learning neural network is usually positively correlated with the complexity, that is, to obtain higher quality images, the neural network model usually needs to be designed more complex, resulting in an increase in the complexity of the image signal processor. FIG. 2 shows an example of an original image and an image processed by an image signal processor in the prior art. As shown in Figure 2, the upper left corner is the original image, the lower right corner is the real image, and the upper right corner is the application of a simple neural network model (calculation amount = 27.8*10^9 times of floating-point operations/second (giga floating ing -point operations per second, GFLOPS)) of the enhanced image 1 output by the image signal processor, the peak signal-to-noise ratio PSNR and structural similarity SSIM are 26.22 and 0.9773 respectively; the lower left corner is the application of a complex neural network model (calculation amount = 4956*10^9 floating-point operations per second) of the enhanced image 2 output by the image signal processor, the peak signal-to-noise ratio PSNR and the structural similarity SSIM are 34.95 and 0.9976, respectively. It can be seen that the image output by the complex neural network model is closer to the real image because the peak signal-to-noise ratio (PSNR) and structural similarity SSIM of the image are higher, and the image brightness and contrast are closer to the real image.
然而,一些终端设备上可能有很多子任务同步在芯片中运行,单独的子任务能够分配得到的算力有限。因此,能够部署在芯片上的模型一般不能过于复杂,一些计算量非常大的模型难以在芯片上部署。However, there may be many subtasks running on the chip synchronously on some terminal devices, and the computing power that can be allocated to individual subtasks is limited. Therefore, the models that can be deployed on the chip are generally not too complex, and some models with a very large amount of calculation are difficult to deploy on the chip.
为了降低计算量,提高执行效率,现有技术一提出一种图像处理方案。该方案主要包括以下几个步骤:In order to reduce the amount of computation and improve execution efficiency, prior art 1 proposes an image processing solution. The program mainly includes the following steps:
(1)对输入图像下采样得到低分辨率的图像,并基于下采样后的图像,预测得到一组融合参数w1、w2、w3;(1) Down-sampling the input image to obtain a low-resolution image, and predicting a set of fusion parameters w 1 , w 2 , w 3 based on the down-sampled image;
(2)根据融合参数w1、w2、w3,对基础的3个颜色查找表进行融合,得到融合后的颜色查找表;(2) According to the fusion parameters w 1 , w 2 , and w 3 , the three basic color look-up tables are fused to obtain the fused color look-up table;
(3)根据融合后的颜色查找表,对输入图像进行插值得到增强图像。(3) According to the fused color lookup table, the input image is interpolated to obtain the enhanced image.
该方案的缺点在于,在原始图像尺寸较大时,如原始图像为1200万像素的4K分辨率图像,总像素数为3072x4096,下采样得到的低分辨率的图像难以具备原始图像的不同区域的准确的局部细节信息。且由融合后的颜色查找表对输入图像进行插值的操作依赖于高度定制化算子,无法通过现有算子实现,导致模型在终端设备的芯片上部署难度很大。The disadvantage of this solution is that when the size of the original image is large, for example, the original image is a 4K resolution image with 12 million pixels, and the total number of pixels is 3072x4096. Accurate local detail information. Moreover, the operation of interpolating the input image by the fused color lookup table depends on highly customized operators, which cannot be realized by existing operators, making it very difficult to deploy the model on the chip of the terminal device.
综上所述,现有技术的图像处理方法在进行图像处理时或难以保留准确的图像细节,或方法实现比较复杂、计算量较大、执行效率较低。有鉴于此,提出了一种图像处理方法、装置、终端设备、存储介质及程序产品,根据本申请实施例的图像处理方法,在保留准确的图像细节的同时,能够简化图像处理流程,降低计算量,提高执行效率。To sum up, the image processing methods in the prior art are either difficult to retain accurate image details during image processing, or the method implementation is relatively complex, with a large amount of calculation and low execution efficiency. In view of this, an image processing method, device, terminal equipment, storage medium, and program product are proposed. According to the image processing method of the embodiment of the present application, while retaining accurate image details, the image processing flow can be simplified, and the computation time can be reduced. volume and improve execution efficiency.
图3示出根据本申请实施例的图像处理方法的示例性应用场景。Fig. 3 shows an exemplary application scenario of the image processing method according to the embodiment of the present application.
如图3所示,应用场景中可包括终端设备,终端设备可设置有处理器,用于运行第二图像处理模型。第二图像处理模型可以包括至少一层,每层包括用于执行本申请实施例的图像处理方法的一个或多个第一图像处理模型。第二图像处理模型的结构的示例可以参见图7。第一图像处理模型的结构的示例可以参见图5。As shown in FIG. 3 , the application scenario may include a terminal device, and the terminal device may be provided with a processor for running the second image processing model. The second image processing model may include at least one layer, and each layer includes one or more first image processing models for executing the image processing method of the embodiment of the present application. An example of the structure of the second image processing model can be referred to FIG. 7 . An example of the structure of the first image processing model can be referred to FIG. 5 .
终端设备还可以包括用于采集图像数据的图像传感器和用于对图像数据进行处理的图像信号处理器,图像信号处理器输出的图像可以是上文所述的针对人眼视觉效果优化的增强图像,并可作为第一层的第一图像处理模型的待处理图像。或者,终端设备可以与设置有图像传感器和图像信号处理器的其他终端设备相连接,以获取其他终端设备的图像信号处理器输出的增强图像,作为第一层的第一图像处理模型的待处理图像。又或者,终端设备可设置有图像信号处理器,并与设置有图像传感器的其他终端设备相连接,以获取其他终端设备的图像传感器采集的图像数据,经图像信号处理器处理得到增强图像,作为第一层的第一图像处理模型的待处理图像。本申请实施例对于待处理图像的具体获取方式不作限制。The terminal device may also include an image sensor for collecting image data and an image signal processor for processing the image data, and the image output by the image signal processor may be an enhanced image optimized for human visual effects as described above , and can be used as the image to be processed in the first image processing model of the first layer. Alternatively, the terminal device may be connected to other terminal devices equipped with image sensors and image signal processors, so as to obtain enhanced images output by the image signal processors of other terminal devices, as the to-be-processed images of the first image processing model of the first layer image. Alternatively, the terminal device may be provided with an image signal processor, and be connected to other terminal devices provided with an image sensor, so as to acquire image data collected by the image sensor of other terminal devices, and obtain an enhanced image through processing by the image signal processor, as The image to be processed of the first image processing model of the first layer. The embodiment of the present application does not limit the specific acquisition manner of the image to be processed.
第二图像处理模型中,每一层的第一图像处理模型通过执行本申请实施例的图像处理方法可对待处理图像进行处理得到处理后的图像,使得处理后的图像更适合目标检测。同一层的第一图像处理模型得到的处理后的图像可以用于得到下一层的第一图像处理模型的待处理图像。最后一层的第一图像处理模型得到的处理后的图像可以用于得到用于目标检测的图像。In the second image processing model, the first image processing model of each layer can process the image to be processed to obtain a processed image by executing the image processing method of the embodiment of the present application, so that the processed image is more suitable for target detection. The processed image obtained by the first image processing model of the same layer can be used to obtain the image to be processed by the first image processing model of the next layer. The processed image obtained by the first image processing model of the last layer can be used to obtain an image for object detection.
本申请的终端设备可以是智能手机、可穿戴电子设备(如智能手环、智能手表等)、虚拟现实设备、车辆、飞行器等等有目标检测需求的设备,或者是与上述有目标检测需求的设备相连接的计算设备。基于此,本申请实施例的图像处理方法可应用在手机拍照、自动驾驶、平安城市等多种应用场景中的图像/视频质量增强任务中。The terminal device of this application can be a smart phone, a wearable electronic device (such as a smart bracelet, a smart watch, etc.), a virtual reality device, a vehicle, an aircraft, etc. The computing device to which the device is connected. Based on this, the image processing method of the embodiment of the present application can be applied to image/video quality enhancement tasks in various application scenarios such as mobile phone photography, automatic driving, and safe city.
图4示出根据本申请实施例的图像处理方法的流程图。Fig. 4 shows a flowchart of an image processing method according to an embodiment of the present application.
如图4所示,在一种可能的实现方式中,所述方法应用于终端设备上的第一图像处理模型,所述方法包括步骤S41-S44:As shown in FIG. 4, in a possible implementation, the method is applied to the first image processing model on the terminal device, and the method includes steps S41-S44:
步骤S41,基于分区参数将待处理图像拆分成多个分区,分区参数指示每个分区的大小。Step S41, splitting the image to be processed into multiple partitions based on partition parameters, where the partition parameters indicate the size of each partition.
图5示出根据本申请实施例的第一图像处理模型的示例性结构。如图5所示,第一图像处理模型可包括分区模块100,用于执行步骤S41。假设待处理图像大小为1000x1000,分区参数是4x4,则基于分区参数对待处理图像进行拆分可得到250x250个分区,每个分区的大小可以相同并且均为4x4。通过这种方式可以将分辨率较大的待处理图像分成分辨率较小的若干小块。Fig. 5 shows an exemplary structure of a first image processing model according to an embodiment of the present application. As shown in FIG. 5 , the first image processing model may include a
步骤S42,针对每个分区进行直方图统计,得到每个分区对应的直方图。Step S42, performing histogram statistics for each partition to obtain a histogram corresponding to each partition.
如图5所示,第一图像处理模型可包括分区直方图计算模块200,用于执行步骤S42。在进行直方图统计时,可以是对步骤S41得到的250x250个分区中的每个分区进行直方图统计得到对应的直方图。生成的直方图的横坐标可以为预设的多个像素值区间,纵坐标可以为像素数。假设图像的像素值范围为0-1,可以预设4个像素值区间,对应的像素值范围分别为0-0.25、0.25-0.5、0.5-0.75、0.75-1,由于每个分区的大小为4x4,即每个分区包括16个像素,则每个直方图的任意一个像素值区间对应的纵坐标的取值范围可以在0-16之间。As shown in FIG. 5 , the first image processing model may include a partition
步骤S43,根据映射参数查找表和每个分区对应的直方图,确定每个分区对应的映射参数。Step S43: Determine the mapping parameters corresponding to each partition according to the mapping parameter lookup table and the histogram corresponding to each partition.
如图5所示,第一图像处理模型可包括映射参数预测模块300,用于执行步骤S43。映射参数预测模块300可以包括映射参数查找表302。映射参数查找表302可以由映射参数预测模型301得到,映射参数预测模型301可以作为映射参数预测模块300的一部分,也可以不设置在第一图像处理模型中,本申请对此不作限制。获得映射参数查找表302的示例性方式可以参见下文的相关描述。As shown in FIG. 5 , the first image processing model may include a mapping
映射参数查找表302可以指示分区与映射参数的对应关系。在本申请实施例中,映射参数可以组为单位,且一组映射参数可以与现有技术中原始图像与处理后的图像之间的映射曲线完成相同的作用。对于某一分区,可直接使用步骤S42得到的直方图作为索引,查找映射参数查找表302,即可得到对应的映射参数。由于在已有映射参数查找表302的前提下无需将直方图输入映射参数预测模型301进行计算,这极大的减少了计算量,显著提升了效率。步骤S43的示例性实现方式可以参见下文的进一步描述。The mapping parameter lookup table 302 may indicate the correspondence between partitions and mapping parameters. In the embodiment of the present application, the mapping parameters may be grouped as a unit, and a group of mapping parameters may perform the same function as the mapping curve between the original image and the processed image in the prior art. For a certain partition, the histogram obtained in step S42 can be directly used as an index to search the mapping parameter lookup table 302 to obtain the corresponding mapping parameter. Since there is no need to input the histogram into the mapping
步骤S44,使用映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像。Step S44, using the mapping parameters to adjust the pixel values of the corresponding partitions in the image to be processed to obtain a processed image.
如图5所示,第一图像处理模型可包括映射模块400,用于执行步骤S44。映射参数可以与分区对比度、亮度等至少一种属性相关联,使得通过调整像素值可以实现分区的对比度、亮度的调整。由于映射参数是与分区一一对应,即不同的分区可使用不同的映射参数,因此调整待处理图像中对应的分区的像素值时可以使得处理后的图像的像素值与应用场景需求更接近,也即更适用于目标检测。步骤S44的示例性实现方式可以参见下文的进一步描述。As shown in FIG. 5 , the first image processing model may include a
根据本申请实施例的图像处理方法,基于分区参数将待处理图像拆分成多个分区,分区参数指示每个分区的大小,使得通过分区参数可以有效提高第一图像处理模型整体的感受野,同时控制后续的计算量,提高图像处理效率;针对每个分区进行直方图统计,得到每个分区对应的直方图,根据映射参数查找表和每个分区对应的直方图,确定每个分区对应的映射参数,使得确定映射参数的耗时大大降低,通过降低时延进一步提升图像处理效率;使用映射参数调整待处理图像中对应的分区的像素值可以得到处理后的图像,其中映射参数是与分区一一对应,因此可以提高图像处理效果,使得处理后的图像与场景更适应。在此情况下,根据本申请实施例的图像处理方法,在保留准确的图像细节的同时,能够简化图像处理流程,降低计算量,提高执行效率。According to the image processing method of the embodiment of the present application, the image to be processed is split into multiple partitions based on the partition parameter, and the partition parameter indicates the size of each partition, so that the overall receptive field of the first image processing model can be effectively improved through the partition parameter, At the same time control the amount of follow-up calculations and improve image processing efficiency; perform histogram statistics for each partition to obtain the histogram corresponding to each partition, and determine the corresponding histogram of each partition according to the mapping parameter lookup table and the histogram corresponding to each partition The mapping parameters greatly reduce the time-consuming of determining the mapping parameters, and further improve the image processing efficiency by reducing the delay; the processed image can be obtained by adjusting the pixel values of the corresponding partitions in the image to be processed by using the mapping parameters, where the mapping parameters are related to the partition One-to-one correspondence, so the image processing effect can be improved, making the processed image more adaptable to the scene. In this case, according to the image processing method of the embodiment of the present application, while retaining accurate image details, the image processing process can be simplified, the amount of calculation can be reduced, and the execution efficiency can be improved.
下面介绍本申请实施例确定每个分区对应的映射参数(步骤S43)的示例性方法。An exemplary method for determining the mapping parameters corresponding to each partition (step S43 ) in the embodiment of the present application is introduced below.
在一种可能的实现方式中,直方图的横坐标为预设的多个像素值区间,直方图的纵坐标为像素数;步骤S43包括:In a possible implementation, the abscissa of the histogram is a preset plurality of pixel value intervals, and the ordinate of the histogram is the number of pixels; step S43 includes:
针对任意一个分区,根据该分区对应的直方图包括的每个像素值区间的像素数,得到该分区对应的特征向量;For any partition, according to the number of pixels in each pixel value interval included in the histogram corresponding to the partition, the feature vector corresponding to the partition is obtained;
在映射参数查找表中找到与特征向量匹配的一组映射参数,作为该分区对应的映射参数。A set of mapping parameters matching the feature vector is found in the mapping parameter lookup table as the mapping parameters corresponding to the partition.
参见上文所述,映射参数查找表302可以指示分区与映射参数的对应关系,例如可以用于记录分区对应的特征向量和映射参数的对应关系,因此可以将每个直方图进一步简化形成特征向量的形式,再从映射参数查找表302中找到相匹配的映射参数。在预设4个像素值区间时,直方图简化成特征向量的方式可以是将每个直方图以长度为4的特征向量的形式表示,每个数值表示直方图中1个像素值区间对应的纵坐标;在存在250x250个分区时,共可得到250x250x4的特征向量。Referring to the above, the mapping parameter lookup table 302 can indicate the correspondence between the partition and the mapping parameter, for example, it can be used to record the correspondence between the feature vector corresponding to the partition and the mapping parameter, so each histogram can be further simplified to form a feature vector form, and then find the matching mapping parameter from the mapping parameter lookup table 302. When 4 pixel value intervals are preset, the histogram can be simplified into a feature vector by expressing each histogram in the form of a feature vector with a length of 4, and each value represents the value corresponding to 1 pixel value interval in the histogram. Vertical coordinate; when there are 250x250 partitions, a total of 250x250x4 feature vectors can be obtained.
通过这种方式,可以完成每个分区对应的映射参数的确定。在已有映射参数查找表的情况下,可以不采用模型计算的方式确定映射参数,从而降低数据处理成本。In this way, the determination of the mapping parameters corresponding to each partition can be completed. In the case of an existing mapping parameter lookup table, the mapping parameters can be determined without model calculation, thereby reducing data processing costs.
在一种可能的实现方式中,一组映射参数包括与待处理图像到处理后的图像的映射曲线的切线的斜率相对应的第一映射参数以及与映射曲线的切线的截距相对应的第二映射参数。In a possible implementation manner, a set of mapping parameters includes a first mapping parameter corresponding to the slope of the tangent line of the mapping curve from the image to be processed to the processed image and a first mapping parameter corresponding to the intercept of the tangent line of the mapping curve Two mapping parameters.
举例来说,现有技术的方案在进行图像的像素值调整时多采用基于映射曲线的调整策略,即对于任意位置处的像素值,均使用同一条映射曲线对其进行调整。这导致某些区域的像素值被拉伸的同时,必然有另一些区域的像素值被压缩,即同一映射曲线对于不同的区域不适应。如果对每一区域都预测一条映射曲线虽然能够保证图像的像素值调整的准确性,但会导致严重的计算浪费。For example, the solutions in the prior art often adopt an adjustment strategy based on a mapping curve when adjusting the pixel value of an image, that is, the same mapping curve is used to adjust the pixel value at any position. As a result, while the pixel values in some areas are stretched, the pixel values in other areas must be compressed, that is, the same mapping curve is not suitable for different areas. If a mapping curve is predicted for each region, although the accuracy of pixel value adjustment of the image can be guaranteed, it will lead to serious calculation waste.
对此,本申请实施例提出采用曲线的切线的斜率和截距代替完整映射曲线,作为像素值调整的参数。由于在一个分区内的像素的像素值比较接近,因此一个分区可以近似看做是曲线上的一个点。因此可以将确定分区对应的完整映射曲线,简化为确定完整映射曲线上这一点的切线的斜率、截距。其中斜率、截距可分别由第一映射参数和第二映射参数来表示。同一点的切线的第一映射参数和第二映射参数可以作为一组映射参数。在此情况下,对于同一分区中的任意像素,虽然像素值可能不同,但可以对应相同的映射参数。In this regard, the embodiment of the present application proposes to use the slope and intercept of the tangent of the curve instead of the complete mapping curve as parameters for pixel value adjustment. Since the pixel values of the pixels in a partition are relatively close, a partition can be approximately regarded as a point on the curve. Therefore, the determination of the complete mapping curve corresponding to the partition can be simplified as determining the slope and intercept of the tangent line at this point on the complete mapping curve. The slope and the intercept can be represented by the first mapping parameter and the second mapping parameter respectively. The first mapping parameter and the second mapping parameter of the tangent at the same point can be used as a set of mapping parameters. In this case, for any pixel in the same partition, although the pixel values may be different, they can correspond to the same mapping parameters.
通过以与切线的斜率和截距对应的一组映射参数代替完整映射曲线,可以大大降低计算量,提高执行效率。By replacing the complete mapping curve with a set of mapping parameters corresponding to the slope and intercept of the tangent, the amount of calculation can be greatly reduced and the execution efficiency can be improved.
下面介绍本申请实施例使用映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像(步骤S44)的示例性方法。The following describes an exemplary method of adjusting the pixel values of the corresponding partitions in the image to be processed by using the mapping parameters to obtain the processed image (step S44 ) in the embodiment of the present application.
在一种可能的实现方式中,步骤S44包括:In a possible implementation, step S44 includes:
针对任意一个分区中的任意一个像素,确定该分区对应的第一映射参数和该像素的像素值的乘积;For any pixel in any partition, determine the product of the first mapping parameter corresponding to the partition and the pixel value of the pixel;
根据所述乘积和该分区对应的第二映射参数之和,得到处理后的图像中的该像素的像素值。The pixel value of the pixel in the processed image is obtained according to the sum of the product and the second mapping parameter corresponding to the partition.
举例来说,假设分区参数为4x4,一共有250x250个分区,则分区i(1≤i≤250x250)中的像素的像素值可以看作一个4x4的像素值矩阵。步骤S43得到的第一映射参数和第二映射参数分别为x1、x2,则分区i对应的第一映射参数x1和该分区i的像素值矩阵img_i的乘积可以是x1*img_i;处理后的图像中的该分区i的像素值矩阵out_i,可以是x1*img_i和该分区i对应的第二映射参数x2之和,也即,out_i=x1*img_i+x2。For example, assuming that the partition parameter is 4x4 and there are 250x250 partitions in total, the pixel values of pixels in partition i (1≤i≤250x250) can be regarded as a 4x4 matrix of pixel values. The first mapping parameter and the second mapping parameter obtained in step S43 are x1 and x2 respectively, then the product of the first mapping parameter x1 corresponding to the partition i and the pixel value matrix img_i of the partition i can be x1*img_i; the processed image The pixel value matrix out_i of the partition i may be the sum of x1*img_i and the second mapping parameter x2 corresponding to the partition i, that is, out_i=x1*img_i+x2.
通过这种方式,使得基于映射参数进行图像的像素值调整时,实际上可以是简单的一次函数的映射,只需极少量的计算,即可实现快速、有效的像素值调整。In this way, the pixel value adjustment of the image based on the mapping parameters can actually be a simple linear function mapping, and only a small amount of calculation is required to achieve fast and effective pixel value adjustment.
下面以映射参数预测模型301设置在映射参数预测模块300中为例,介绍映射参数预测模型301的训练方式,以及使用训练好的映射参数预测模型301生成映射参数查找表的示例性方法。Taking the mapping
映射参数预测模型301可以是神经网络模型,可以采用现有技术的方式进行训练,通过多轮迭代,使得映射参数预测模型具备“输入一个分区的直方图对应的特征向量,预测对应映射参数”的功能。举例来说,可基于分区参数将样本图像拆分成多个样本分区,针对每个样本分区进行直方图统计得到每个样本分区对应的样本直方图,其示例性实现方式和上文所述的步骤S41、S42可以相同,并且也可以由上文所述的分区模块100和分区直方图计算模块200分别完成,在此不再赘述。其中,拆分样本图像时使用的分区参数与步骤S41中使用的分区参数可以相同,也可以不同,本申请对此不作限制。The mapping
在得到分区对应的样本直方图后,可以将样本直方图输入上文所述的映射参数预测模块300。图6示出根据本申请实施例的映射参数预测模块300的一种示例性工作方式。如图6所示,在终端设备处于训练阶段时,映射参数预测模块300可根据直方图先得到特征向量,作为映射参数预测模型301的输入,多次迭代对映射参数预测模型301进行训练,本申请对于映射参数预测模型301的具体训练方式不作限制。在终端设备未处于训练阶段时,映射参数预测模块300可运行映射参数查找表302执行上文所述的步骤S43。After the sample histogram corresponding to the partition is obtained, the sample histogram can be input into the above-mentioned mapping
下面介绍映射参数查找表302的示例性获取方法。An exemplary acquisition method of the mapping parameter lookup table 302 is introduced below.
在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:
基于分区参数构建多个样本特征向量,每个样本特征向量对应样本直方图的每个像素值区间的像素数在该分区参数下的所有组合;Construct multiple sample feature vectors based on partition parameters, each sample feature vector corresponds to all combinations of the number of pixels in each pixel value interval of the sample histogram under the partition parameters;
将多个样本特征向量分别输入映射参数预测模型,映射参数预测模型输出每个样本特征向量对应的映射参数;Inputting a plurality of sample feature vectors into the mapping parameter prediction model respectively, and the mapping parameter prediction model outputs the mapping parameters corresponding to each sample feature vector;
根据多个样本特征向量和每个样本特征向量对应的映射参数生成映射参数查找表,映射参数查找表记录每个样本特征向量及其对应的一组映射参数。A mapping parameter lookup table is generated according to the multiple sample feature vectors and the mapping parameters corresponding to each sample feature vector, and the mapping parameter lookup table records each sample feature vector and a corresponding set of mapping parameters.
举例来说,训练好映射参数预测模型301后,可以基于分区参数构建多个样本特征向量,使得每个样本特征向量对应样本直方图的每个像素值区间的像素数在该分区参数下的所有组合,也即,遍历每种分区参数下直方图的所有可能的情况,得到对应的样本特征向量并将多个样本特征向量分别输入映射参数预测模型301,映射参数预测模型301输出每个样本特征向量对应的映射参数。这一过程可以离线完成。根据多个样本特征向量和每个样本特征向量对应的映射参数生成映射参数查找表,使得映射参数查找表记录每个样本特征向量及其对应的一组映射参数,例如可以将全部的<输入特征向量,输出映射参数>保存下来,即可形成映射参数查找表302。For example, after the mapping
通过这种方式得到映射参数查找表后,在终端设备获取到待处理图像时,便无需再经过映射参数预测模型进行计算,从而有效减少了计算量。After the mapping parameter lookup table is obtained in this way, when the terminal device obtains the image to be processed, it does not need to go through the mapping parameter prediction model for calculation, thereby effectively reducing the amount of calculation.
在一种可能的实现方式中,所述映射参数预测模型的感受野的数值小于第一阈值。In a possible implementation manner, the value of the receptive field of the mapping parameter prediction model is smaller than a first threshold.
参见上文所述,感受野表示神经网络内部的不同位置的神经元对原图像的感受范围的大小,对于映射参数预测模型来说,感受野大小可以是该模型中的卷积操作的卷积核尺寸。可以看出,感受野越大卷积操作越复杂,生成映射参数查找表302的速度越慢,同时复杂的卷积操作对于映射参数的准确度的影响也更大。See above, the receptive field represents the size of the receptive range of neurons at different positions in the neural network to the original image. For the mapping parameter prediction model, the receptive field size can be the convolution of the convolution operation in the model nuclear size. It can be seen that the larger the receptive field is, the more complex the convolution operation is, and the slower the speed of generating the mapping parameter lookup table 302 is, meanwhile, the complex convolution operation has a greater impact on the accuracy of the mapping parameters.
对此,本申请实施例提出使得映射参数预测模型的感受野的数值小于第一阈值,以保证映射参数查找表的生成速度,并减少映射参数预测模型的感受野大小对于映射参数的准确度的影响。第一阈值的具体数值可按需设置,本申请对此不作限制。在一个示例中,可以将映射参数预测模型的感受野的数值设置为1x1,在此情况下,映射参数可以仅与分区直方图相关,而不受其他因素影响。且由于本申请实施例的第一图像处理模型的感受野可以通过调节分区参数而增大,因此即便降低映射参数预测模型的感受野,在后续操作中也可以通过增大分区参数的操作将损失的精度弥补回来,从而并不会降低网络的整体效果。In this regard, the embodiment of the present application proposes to make the value of the receptive field of the mapping parameter prediction model smaller than the first threshold, so as to ensure the generation speed of the mapping parameter lookup table, and reduce the size of the receptive field of the mapping parameter prediction model on the accuracy of the mapping parameters. Influence. The specific numerical value of the first threshold can be set as required, which is not limited in the present application. In one example, the value of the receptive field of the mapping parameter prediction model can be set to 1×1, in this case, the mapping parameter can only be related to the partition histogram, and not be affected by other factors. And because the receptive field of the first image processing model in the embodiment of the present application can be increased by adjusting the partition parameters, even if the receptive field of the mapping parameter prediction model is reduced, the loss can be reduced by increasing the partition parameters in subsequent operations. The accuracy of the network is compensated, so that it does not reduce the overall effect of the network.
通过这种方式,可以提升映射参数查找表的生成效率,并保证映射参数查找表的准确度。In this way, the generation efficiency of the mapping parameter lookup table can be improved, and the accuracy of the mapping parameter lookup table can be guaranteed.
在一种可能的实现方式中,所述终端设备上还包括第二图像处理模型,所述第二图像处理模型包括至少一层,每层包括至少一个第一图像处理模型,In a possible implementation manner, the terminal device further includes a second image processing model, the second image processing model includes at least one layer, and each layer includes at least one first image processing model,
所述第二图像处理模型包括多层时,各层之间串联;When the second image processing model includes multiple layers, each layer is connected in series;
每层包括多个第一图像处理模型时,各第一图像处理模型之间并联,同一层的各第一图像处理模型的分区参数不同。When each layer includes multiple first image processing models, the first image processing models are connected in parallel, and the partition parameters of the first image processing models in the same layer are different.
举例来说,第一图像处理模型的分区参数通常不变,因此为进一步提高图像处理效果,本申请实施例还提出使多个第一图像处理模型串联和/或并联,得到第二图像处理模型,使用第二图像处理模型来进行图像处理。图7示出根据本申请实施例的第二图像处理模型的示例性结构。For example, the partition parameters of the first image processing model are usually unchanged, so in order to further improve the image processing effect, the embodiment of the present application also proposes to connect multiple first image processing models in series and/or in parallel to obtain the second image processing model , using the second image processing model to perform image processing. Fig. 7 shows an exemplary structure of a second image processing model according to an embodiment of the present application.
一方面,基于神经网络的模型的图像处理效果与网络的感受野强相关,单个第一图像处理模型的感受野较为有限,为进一步提高感受野,可以设计第二图像处理模型的一层包括并联的多个第一图像处理模型,并使得同一层的各第一图像处理模型的分区参数不同,例如可使得同一层的各第一图像处理模型的分区参数依次增大,实现感受野的增大。如图7所示,可以设置每一层包括3个并联的第一图像处理模型,每个第一图像处理模型的分区参数分别为4x4、8x8、16x16。On the one hand, the image processing effect of the neural network-based model is strongly related to the receptive field of the network. The receptive field of a single first image processing model is relatively limited. In order to further improve the receptive field, one layer of the second image processing model can be designed to include parallel multiple first image processing models, and make the partition parameters of the first image processing models of the same layer different, for example, the partition parameters of the first image processing models of the same layer can be increased sequentially to realize the increase of the receptive field . As shown in FIG. 7 , each layer can be set to include three parallel first image processing models, and the partition parameters of each first image processing model are 4x4, 8x8, and 16x16 respectively.
本领域技术人员应理解,感受野的增大也可以采用其他现有技术的方式实现,例如一种现有技术是通过预留“空洞”的方式提升感受野,采用该方法时,可以保持分区参数不变,在将待处理图像拆分成多个分区时,跳过其中的部分像素,以使得同一分区的像素在待处理图像中的区域更大。本申请对于增大感受野的方式不作限制。Those skilled in the art should understand that the increase of the receptive field can also be achieved by means of other existing technologies. For example, one existing technology is to increase the receptive field by reserving "holes". When using this method, the partition can be maintained The parameters remain unchanged. When the image to be processed is split into multiple partitions, some pixels are skipped, so that the pixels of the same partition have a larger area in the image to be processed. The present application does not limit the way of increasing the receptive field.
另一方面,仅一层的模型的得到的分区是相互独立的,为实现不同分区的交互,可以设计第二图像处理模型包括多层,各层之间串联。通过多个串联通路,逐层递进式的提高最终的图像处理效果。在本实施例中,如图7所示,可以设置3层,每层中的第一图像处理模型的分区参数分别为4x4、8x8、16x16。在实际应用时,各层的第一图像处理模型的分区参数也可以不同,本申请对此不作限制。On the other hand, the obtained partitions of the model with only one layer are independent of each other. In order to realize the interaction of different partitions, the second image processing model can be designed to include multiple layers, and the layers are connected in series. Through multiple serial channels, the final image processing effect is progressively improved layer by layer. In this embodiment, as shown in FIG. 7 , three layers can be set, and the partition parameters of the first image processing model in each layer are 4x4, 8x8, and 16x16 respectively. In actual application, the partition parameters of the first image processing model of each layer may also be different, which is not limited in the present application.
通过并联通路提升感受野,通过串联通路加强各分区的交互,可以提升图像处理效果。Improving the receptive field through parallel paths and strengthening the interaction of each partition through series paths can improve the image processing effect.
在一种可能的实现方式中,针对第二图像处理模型的任意一层,该层包括一个第一图像处理模型时,该第一图像处理模型得到的处理后的图像作为下一层的第一图像处理模型的待处理图像,该层包括多个第一图像处理模型时,该多个第一图像处理模型得到的处理后的图像的均值作为下一层的第一图像处理模型的待处理图像。In a possible implementation, for any layer of the second image processing model, when the layer includes a first image processing model, the processed image obtained by the first image processing model is used as the first layer of the next layer. The image to be processed of the image processing model, when the layer includes a plurality of first image processing models, the mean value of the processed image obtained by the plurality of first image processing models is used as the image to be processed of the first image processing model of the next layer .
举例来说,第二图像处理模型的一层可能包括一个第一图像处理模型,也可能包括并联的多个第一图像处理模型,针对这两种不同情况,该层的整体输出可能不同。For example, a layer of the second image processing model may include one first image processing model, or may include multiple first image processing models connected in parallel. For these two different cases, the overall output of this layer may be different.
其中,第二图像处理模型的一层包括一个第一图像处理模型时,该第一图像处理模型得到的处理后的图像可以直接作为下一层的第一图像处理模型的待处理图像,如果该层已经是最后一层,则该第一图像处理模型得到的处理后的图像可以直接作为最终的处理后的图像输出。Wherein, when one layer of the second image processing model includes a first image processing model, the processed image obtained by the first image processing model can be directly used as the image to be processed by the first image processing model of the next layer, if the layer is already the last layer, the processed image obtained by the first image processing model can be directly output as the final processed image.
第二图像处理模型的一层包括多个第一图像处理模型时,可以是多个第一图像处理模型得到的处理后的图像的均值作为下一层的第一图像处理模型的待处理图像,如果该层已经是最后一层,则多个第一图像处理模型得到的处理后的图像的均值可以作为最终的处理后的图像输出。When one layer of the second image processing model includes a plurality of first image processing models, the mean value of the processed image obtained by the plurality of first image processing models may be used as the image to be processed of the first image processing model of the next layer, If the layer is already the last layer, the mean value of the processed images obtained by multiple first image processing models can be output as the final processed image.
通过这种方式,可以保证第二图像处理模型的图像处理效果可以逐层递进。In this way, it can be ensured that the image processing effect of the second image processing model can be progressive layer by layer.
表1和表2示出使用本申请实施例的第一图像处理模型、第二图像处理模型得到的处理后的图像,与现有技术的图像处理方法得到的处理后的图像在应用于目标检测场景时的检测效果。Table 1 and Table 2 show the processed image obtained using the first image processing model and the second image processing model of the embodiment of the present application, and the processed image obtained by the image processing method of the prior art when applied to target detection The detection effect of the scene.
表1Table 1
表2Table 2
在表1和表2中,基准1表示输入检测器的是图像信号处理器得到的图像;基准2表示输入检测器的是采用现有技术一的方案得到的图像;Ours 11表示输入检测器的是采用本申请实施例的一个第一图像处理模型得到的图像;Ours 33表示输入检测器的是表示采用本申请实施例的第二图像处理模型得到的图像,其中第二图像处理模型包括三层,每层包括三个第一图像处理模型。In Table 1 and Table 2, benchmark 1 indicates that what is input to the detector is an image obtained by an image signal processor; benchmark 2 indicates that what is input to the detector is an image obtained by adopting the scheme of prior art one; Ours 11 indicates that what is input to the detector It is the image obtained by adopting a first image processing model of the embodiment of the present application; Ours 33 represents the image obtained by the second image processing model of the embodiment of the present application, and Ours 33 represents the input detector, wherein the second image processing model includes three layers , each layer includes three first image processing models.
表1示出各方案得到的图像在两阶段检测器上的检测结果。表2示出各方案得到的图像在一阶段检测器上的检测结果。两种检测器均是现有技术已有的检测器,且检测原理不同。Table 1 shows the detection results of the images obtained by each scheme on the two-stage detector. Table 2 shows the detection results of the images obtained by each scheme on the one-stage detector. Both detectors are existing detectors in the prior art, and their detection principles are different.
平均正确率(average preci s ion,AP)是表示检测器在某一类上检测精度的指标。指标越高,表明检测器在这一类别上的检测精度越高。在表1和表2中,共检测3类(AP1、AP2、AP3)的检测精度。The average accuracy rate (average precision, AP) is an index indicating the detection accuracy of a detector on a certain class. The higher the index, the higher the detection accuracy of the detector on this category. In Table 1 and Table 2, the detection accuracy of 3 categories (AP1, AP2, AP3) is detected.
平均精度(mean average preci s ion,mAP)是各类别平均正确率的算术平均值。一般地,该数值越大,表示检测器的检测精度越高。在表1和表2中,可以是AP1、AP2、AP3的算术平均值。Mean average precision (mAP) is the arithmetic mean of the average correct rate of each category. Generally, the larger the value, the higher the detection accuracy of the detector. In Table 1 and Table 2, it can be the arithmetic mean of AP1, AP2, and AP3.
帧率(frames per second,FPS)是表示计算速度的指标,代表一秒内的执行次数。在表1和表2中,可以是第一图像处理模型/第二图像处理模型在某现有图形处理器平台上对于3072x4096分辨率的待处理图像的计算速度。其中基准1没有对图像信号处理器输出的图像进行后处理,因此无法统计对应的计算速度。Frame rate (frames per second, FPS) is an indicator of calculation speed, representing the number of executions in one second. In Table 1 and Table 2, it may be the calculation speed of the first image processing model/the second image processing model for an image to be processed with a resolution of 3072x4096 on an existing graphics processor platform. Among them, Benchmark 1 does not post-process the image output by the image signal processor, so the corresponding calculation speed cannot be counted.
根据上述两个表格可以看出,本申请实施例在不同设计原理的检测器上均能有很好的效果。According to the above two tables, it can be seen that the embodiments of the present application can have good effects on detectors with different design principles.
图8-图12示出根据本申请实施例得到的处理后的图像的目标检测结果以及现有技术得到的图像的目标检测结果的对比。8 to 12 show the comparison of the target detection results of the processed images obtained according to the embodiment of the present application and the target detection results of the images obtained in the prior art.
进行对比的是图像信号处理器得到的图像、现有技术一得到的图像以及采用本申请实施例的第一图像处理模型得到的图像的目标检测结果。为方便对比,在图8、图9、图12中用箭头标注出三种方案目标检测结果的差异。可以看出,在图8中,原始图像的目标检测结果中检测到2个对象,现有技术一得到的图像的目标检测结果中检测到3个对象,采用本申请实施例的第一图像处理模型得到的图像的目标检测结果中检测到4个对象。The object detection results of the image obtained by the image signal processor, the image obtained by the prior art 1, and the image obtained by using the first image processing model of the embodiment of the present application are compared. For the convenience of comparison, the differences in the target detection results of the three schemes are marked with arrows in Figure 8, Figure 9, and Figure 12. It can be seen that in Fig. 8, 2 objects are detected in the target detection result of the original image, and 3 objects are detected in the target detection result of the image obtained in prior art 1, and the first image processing of the embodiment of the present application is adopted There are 4 objects detected in the object detection result of the image obtained by the model.
在图9中,原始图像的目标检测结果中检测到2个对象,但其中一个对象的检测框与实际对象出现很大偏差。现有技术一得到的图像的目标检测结果中检测到1个对象,采用本申请实施例的第一图像处理模型得到的图像的目标检测结果中检测到2个对象,且每个对象与实际对象的检测框的匹配程度均较高。In Figure 9, 2 objects are detected in the target detection result of the original image, but the detection frame of one of the objects deviates greatly from the actual object. One object is detected in the target detection result of the image obtained in the prior art, and 2 objects are detected in the target detection result of the image obtained by using the first image processing model of the embodiment of the present application, and each object is different from the actual object The matching degree of the detection boxes is relatively high.
在图10中,原始图像的目标检测结果中没有检测到对象,现有技术一得到的图像的目标检测结果中没有检测到对象,采用本申请实施例的第一图像处理模型得到的图像的目标检测结果中检测到1个对象。In Fig. 10, no object is detected in the target detection result of the original image, and no object is detected in the target detection result of the image obtained in prior art 1, and the target of the image obtained by using the first image processing model of the embodiment of the present application 1 object was detected in the detection result.
在图11中,原始图像的目标检测结果中检测到1个对象。现有技术一得到的图像的目标检测结果中检测到1个对象,采用本申请实施例的第一图像处理模型得到的图像的目标检测结果中检测到2个对象。In Fig. 11, 1 object is detected in the object detection result of the original image. One object is detected in the object detection result of the image obtained in prior art 1, and two objects are detected in the object detection result of the image obtained by using the first image processing model of the embodiment of the present application.
在图12中,原始图像的目标检测结果中检测到4个对象,包括3个行人和1个车辆。现有技术一得到的图像的目标检测结果中检测到5个对象,包括2个行人和3个车辆。采用本申请实施例的第一图像处理模型得到的图像的目标检测结果中检测到6个对象,包括3个行人和3个车辆。In Figure 12, 4 objects are detected in the object detection results of the original image, including 3 pedestrians and 1 vehicle. In the target detection result of the image obtained in prior art 1, 5 objects are detected, including 2 pedestrians and 3 vehicles. In the object detection result of the image obtained by using the first image processing model of the embodiment of the present application, 6 objects are detected, including 3 pedestrians and 3 vehicles.
因此,本申请实施例的第一图像处理模型得到的图像的在错检、漏检、检测框与实际对象的匹配程度等方面均优于对比方案。Therefore, the image obtained by the first image processing model in the embodiment of the present application is superior to the comparison scheme in terms of false detection, missed detection, matching degree between the detection frame and the actual object, and the like.
本申请的实施例提供了一种图像处理装置,图13示出根据本申请实施例的图像处理装置的示例性结构图。An embodiment of the present application provides an image processing device, and FIG. 13 shows an exemplary structural diagram of the image processing device according to the embodiment of the present application.
如图13所示,装置应用于终端设备上的第一图像处理模型,所述装置包括:As shown in Figure 13, the device is applied to the first image processing model on the terminal device, and the device includes:
拆分模块141,用于基于分区参数将待处理图像拆分成多个分区,所述分区参数指示每个分区的大小;A
统计模块142,用于针对每个分区进行直方图统计,得到每个分区对应的直方图;
预测模块143,用于根据映射参数查找表和所述每个分区对应的直方图,确定每个分区对应的映射参数;A
映射模块144,用于使用所述映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像。The
其中,拆分模块141可以由上文所述的分区模块100实现,统计模块142可以由上文所述的分区直方图计算模块200实现,预测模块143可以由上文所述的映射参数预测模型301实现,映射模块144可以由上文所述的映射模块400实现。Wherein, the
在一种可能的实现方式中,所述直方图的横坐标为预设的多个像素值区间,所述直方图的纵坐标为像素数;所述根据映射参数查找表和所述每个分区对应的直方图,确定每个分区对应的映射参数,包括:针对任意一个分区,根据该分区对应的直方图包括的每个像素值区间的像素数,得到该分区对应的特征向量;在所述映射参数查找表中找到与所述特征向量匹配的一组映射参数,作为该分区对应的映射参数。In a possible implementation manner, the abscissa of the histogram is a plurality of preset pixel value intervals, and the ordinate of the histogram is the number of pixels; the lookup table according to the mapping parameters and each partition Corresponding histogram, determining the mapping parameters corresponding to each partition, including: for any partition, according to the number of pixels in each pixel value interval included in the histogram corresponding to the partition, obtain the feature vector corresponding to the partition; in the A set of mapping parameters matching the feature vector is found in the mapping parameter lookup table as the mapping parameters corresponding to the partition.
在一种可能的实现方式中,所述一组映射参数包括与待处理图像到处理后的图像的映射曲线的切线的斜率相对应的第一映射参数以及与所述映射曲线的切线的截距相对应的第二映射参数。In a possible implementation manner, the set of mapping parameters includes a first mapping parameter corresponding to the slope of the tangent line of the mapping curve from the image to be processed to the processed image and the intercept of the tangent line to the mapping curve The corresponding second mapping parameter.
在一种可能的实现方式中,所述使用所述映射参数调整待处理图像中对应的分区的像素值,得到处理后的图像,包括:针对任意一个分区中的任意一个像素,确定该分区对应的第一映射参数和该像素的像素值的乘积;根据所述乘积和该分区对应的第二映射参数之和,得到处理后的图像中的该像素的像素值。In a possible implementation manner, the adjusting the pixel value of the corresponding partition in the image to be processed by using the mapping parameters to obtain the processed image includes: for any pixel in any partition, determining that the partition corresponds to The product of the first mapping parameter and the pixel value of the pixel; according to the sum of the product and the second mapping parameter corresponding to the partition, obtain the pixel value of the pixel in the processed image.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
构建模块,用于基于分区参数构建多个样本特征向量,每个样本特征向量对应样本直方图的每个像素值区间的像素数在该分区参数下的所有组合;A building block for constructing a plurality of sample feature vectors based on partition parameters, each sample feature vector corresponding to all combinations of the number of pixels in each pixel value interval of the sample histogram under the partition parameters;
输入模块,用于将所述多个样本特征向量分别输入所述映射参数预测模型,所述映射参数预测模型输出每个样本特征向量对应的映射参数;An input module, configured to respectively input the plurality of sample feature vectors into the mapping parameter prediction model, and the mapping parameter prediction model outputs a mapping parameter corresponding to each sample feature vector;
生成模块,用于根据所述多个样本特征向量和每个样本特征向量对应的映射参数生成所述映射参数查找表,所述映射参数查找表记录每个样本特征向量及其对应的一组映射参数。A generation module, configured to generate the mapping parameter lookup table according to the plurality of sample feature vectors and the mapping parameters corresponding to each sample feature vector, and the mapping parameter lookup table records each sample feature vector and its corresponding set of mappings parameter.
其中,构建模块、输入模块、生成模块可以由上文所述的映射参数预测模块300实现。Wherein, the construction module, the input module, and the generation module can be realized by the above-mentioned mapping
在一种可能的实现方式中,所述映射参数预测模型的感受野的数值小于第一阈值。In a possible implementation manner, the value of the receptive field of the mapping parameter prediction model is smaller than a first threshold.
在一种可能的实现方式中,所述终端设备上还包括第二图像处理模型,所述第二图像处理模型包括至少一层,每层包括至少一个第一图像处理模型,所述第二图像处理模型包括多层时,各层之间串联;每层包括多个第一图像处理模型时,各第一图像处理模型之间并联,同一层的各第一图像处理模型的分区参数不同。In a possible implementation manner, the terminal device further includes a second image processing model, the second image processing model includes at least one layer, each layer includes at least one first image processing model, and the second image processing model When the processing model includes multiple layers, the layers are connected in series; when each layer includes multiple first image processing models, the first image processing models are connected in parallel, and the partition parameters of the first image processing models in the same layer are different.
在一种可能的实现方式中,针对所述第二图像处理模型的任意一层,该层包括一个第一图像处理模型时,该第一图像处理模型得到的处理后的图像作为下一层的第一图像处理模型的待处理图像,该层包括多个第一图像处理模型时,该多个第一图像处理模型得到的处理后的图像的均值作为下一层的第一图像处理模型的待处理图像。In a possible implementation manner, for any layer of the second image processing model, when the layer includes a first image processing model, the processed image obtained by the first image processing model is used as the The image to be processed by the first image processing model, when the layer includes multiple first image processing models, the mean value of the processed image obtained by the multiple first image processing models is used as the image to be processed by the first image processing model of the next layer Process images.
本申请的实施例提供了一种终端设备,包括:处理器以及用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述方法。An embodiment of the present application provides a terminal device, including: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。An embodiment of the present application provides a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。An embodiment of the present application provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium bearing computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
图14示出根据本申请实施例的终端设备的示例性结构图。Fig. 14 shows an exemplary structural diagram of a terminal device according to an embodiment of the present application.
如图14所示,终端设备可以包括手机、可折叠电子设备、手持计算机、超级移动个人计算机(u ltra-mobi le persona l computer,UMPC)、个人数字助理(persona l digita l ass i stant,PDA)、增强现实(augmented rea l ity,AR)设备、虚拟现实(virtua l rea l ity,VR)设备、人工智能(art ificia l inte l l igence,AI)设备、可穿戴式设备、车载设备、智能家居设备、或智慧城市设备中的至少一种。本申请实施例对该终端设备的具体类型不作特殊限制。As shown in Figure 14, terminal devices may include mobile phones, foldable electronic devices, handheld computers, ultra-mobile personal computers (ultra-mobile persona l computer, UMPC), personal digital assistants (persona l digital l ass i stant, PDA) ), augmented reality (augmented real ity, AR) equipment, virtual reality (virtua l real ity, VR) equipment, artificial intelligence (artificia l intelligence, AI) equipment, wearable equipment, vehicle-mounted equipment, smart At least one of household equipment, or smart city equipment. The embodiment of the present application does not specifically limit the specific type of the terminal device.
终端设备可以包括处理器110,存储器121,通信模块160。可以理解的是,本申请实施例示意的结构并不构成对终端设备的具体限定。在本申请另一些实施例中,终端设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。The terminal device may include a
处理器110可包括一个或多个处理单元,例如:处理器110可以包括应用处理器(app l icat ion processor,AP),调制解调处理器,图形处理器(graph ics process ingun it,GPU),图像信号处理器(image s igna l processor,ISP),控制器,视频编解码器,数字信号处理器(d igita l s igna l processor,DSP),基带处理器,和/或神经网络处理器(neura l-network process ing un it,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The
处理器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor can generate an operation control signal according to the instruction opcode and the timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110用过或使用频率较高的指令或数据,例如本申请实施例中的分区参数等。如果处理器110需要使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如映射参数查找表)等。存储数据区可存储终端设备使用过程中所获取或创建的数据(比如直方图等)等。此外,存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universa lf l ash storage,UFS)等。处理器110通过运行存储在存储器121的指令,和/或存储在设置于处理器中的存储器的指令,实现上述终端设备所执行的各种方法。The memory 121 may be used to store computer-executable program code including instructions. The memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, an application program required by at least one function (such as a mapping parameter lookup table) and the like. The storage data area may store data acquired or created during the use of the terminal device (such as a histogram, etc.). In addition, the memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash memory (universal lf flash storage, UFS) and the like. The
通信模块160可以用于通过无线通信/有线通信的方式从其他装置或设备接收数据(例如本申请实施例中的图像数据和增强图像),以及向其他装置或设备输出数据。例如可以提供包括WLAN(如Wi-Fi网络)、蓝牙(Bl uetooth,BT)、全球导航卫星系统(globa lnavigat ion sate l l ite system,GNSS)、调频(frequency modu l at ion,FM)、近距离无线通信技术(near fie ld commun icat ion,NFC)、红外技术(infrared,I R)等无线通信的解决方案。The communication module 160 can be used to receive data (such as image data and enhanced images in the embodiment of the present application) from other devices or devices through wireless communication/wired communication, and output data to other devices or devices. For example, WLAN (such as Wi-Fi network), Bluetooth (Bluetooth, BT), global navigation satellite system (globa lnavigation satellite system, GNSS), frequency modulation (frequency modu l at ion, FM), short-distance Wireless communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RandomAccess Memory,RAM)、只读存储器(Read On ly Memory,ROM)、可擦式可编程只读存储器(Electr ica l ly Programmab le Read-On ly-Memory,EPROM或闪存)、静态随机存取存储器(Stat ic Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Di scRead-On ly Memory,CD-ROM)、数字多功能盘(Digita l Video Di sc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disk, hard disk, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), erasable Type Programmable Read-Only Memory (Electrica l ly Programmable Read-Only-Memory, EPROM or flash memory), Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compact Disk Read-Only Memory (Compact Di scRead-Only Memory (CD-ROM), Digital Versatile Disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised in grooves on which instructions are stored structure, and any suitable combination of the above.
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer readable program instructions or codes described herein may be downloaded from a computer readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, local area network, wide area network, and/or wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(I nstruction Set Arch itecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Sma l lta l k、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Loca l Area Network,LAN)或广域网(WideArea Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Fie ld-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmab le Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。Computer program instructions for performing the operations of the present application may be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in the form of a or any combination of programming languages, including object-oriented programming languages—such as Small ltalk, C++, etc., and conventional procedural programming languages—such as “C” or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or programmable logic arrays ( Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects of the present application.
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本申请的多个实施例的装置、系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。The flowchart and block diagrams in the figures show the architecture, functions and operations of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(App l icat ionSpecific I ntegrated Ci rcu it,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。It should also be noted that each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented with hardware (such as a circuit or an ASIC (App l icationSpecific Integrated Circuit (ASIC)) or a combination of hardware and software, such as firmware.
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(compr i s ing)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present invention has been described in conjunction with various embodiments herein, in the process of implementing the claimed invention, those skilled in the art can understand and Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Having described various embodiments of the present application above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principle of each embodiment, practical application or improvement of technology in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310104869.XA CN116309634B (en) | 2023-01-28 | 2023-01-28 | Image processing method, device, terminal device, storage medium and program product |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310104869.XA CN116309634B (en) | 2023-01-28 | 2023-01-28 | Image processing method, device, terminal device, storage medium and program product |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116309634A true CN116309634A (en) | 2023-06-23 |
| CN116309634B CN116309634B (en) | 2026-01-27 |
Family
ID=86815935
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310104869.XA Active CN116309634B (en) | 2023-01-28 | 2023-01-28 | Image processing method, device, terminal device, storage medium and program product |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116309634B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116957961A (en) * | 2023-07-10 | 2023-10-27 | 成都西纬科技有限公司 | Method for enhancing image contrast, electronic device and storage medium |
| CN118450042A (en) * | 2023-10-11 | 2024-08-06 | 荣耀终端有限公司 | Display method and electronic equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070291288A1 (en) * | 2006-06-15 | 2007-12-20 | Richard John Campbell | Methods and Systems for Segmenting a Digital Image into Regions |
| US20180293720A1 (en) * | 2017-04-07 | 2018-10-11 | Nuflare Technology, Inc. | Pattern inspection apparatus, pattern position measurement apparatus, aerial image measurement system, method for measuring aerial image,pattern position repairing apparatus, method for repairing pattern position, aerial image data processing apparatus, method for processing aerial image data, pattern exposure apparatus, method for exposing pattern, method for manufacturing mask, and mask manufacturing system |
| CN111062891A (en) * | 2019-12-16 | 2020-04-24 | Oppo广东移动通信有限公司 | Image processing method, device, terminal and computer readable storage medium |
| CN112598758A (en) * | 2020-10-22 | 2021-04-02 | 努比亚技术有限公司 | Image processing method, mobile terminal and computer storage medium |
| CN115330633A (en) * | 2022-08-23 | 2022-11-11 | Oppo广东移动通信有限公司 | Image tone mapping method and device, electronic equipment and storage medium |
-
2023
- 2023-01-28 CN CN202310104869.XA patent/CN116309634B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070291288A1 (en) * | 2006-06-15 | 2007-12-20 | Richard John Campbell | Methods and Systems for Segmenting a Digital Image into Regions |
| US20180293720A1 (en) * | 2017-04-07 | 2018-10-11 | Nuflare Technology, Inc. | Pattern inspection apparatus, pattern position measurement apparatus, aerial image measurement system, method for measuring aerial image,pattern position repairing apparatus, method for repairing pattern position, aerial image data processing apparatus, method for processing aerial image data, pattern exposure apparatus, method for exposing pattern, method for manufacturing mask, and mask manufacturing system |
| CN111062891A (en) * | 2019-12-16 | 2020-04-24 | Oppo广东移动通信有限公司 | Image processing method, device, terminal and computer readable storage medium |
| CN112598758A (en) * | 2020-10-22 | 2021-04-02 | 努比亚技术有限公司 | Image processing method, mobile terminal and computer storage medium |
| CN115330633A (en) * | 2022-08-23 | 2022-11-11 | Oppo广东移动通信有限公司 | Image tone mapping method and device, electronic equipment and storage medium |
Non-Patent Citations (2)
| Title |
|---|
| HTTPS://VISION.UNIPV.IT/CORSI/COMPUTERVISION/SLIDES/CV03.PDF: "Histogram and LUT operations", HTTPS://VISION.UNIPV.IT/CORSI/COMPUTERVISION/SLIDES/CV03.PDF, 2 November 2021 (2021-11-02) * |
| 张萌: "非制冷长波红外图像处理系统的设计与实现", 中国优秀硕士学位论文全文数据库, 15 February 2017 (2017-02-15) * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116957961A (en) * | 2023-07-10 | 2023-10-27 | 成都西纬科技有限公司 | Method for enhancing image contrast, electronic device and storage medium |
| CN118450042A (en) * | 2023-10-11 | 2024-08-06 | 荣耀终端有限公司 | Display method and electronic equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116309634B (en) | 2026-01-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7218805B2 (en) | Semantic segmentation using soft cross-entropy loss | |
| EP4200799B1 (en) | Spatiotemporal recycling network | |
| CN113066017B (en) | Image enhancement method, model training method and equipment | |
| US10937169B2 (en) | Motion-assisted image segmentation and object detection | |
| CN109583340B (en) | A video object detection method based on deep learning | |
| US20220392202A1 (en) | Imaging processing method and apparatus, electronic device, and storage medium | |
| Chen et al. | Multi-cue event information fusion for pedestrian detection with neuromorphic vision sensors | |
| WO2023083231A1 (en) | System and methods for multiple instance segmentation and tracking | |
| US11385526B2 (en) | Method of processing image based on artificial intelligence and image processing device performing the same | |
| CN116917954A (en) | Image detection method, device and electronic equipment | |
| CN116309634A (en) | Image processing method, device, terminal equipment, storage medium and program product | |
| WO2023230927A1 (en) | Image processing method and device, and readable storage medium | |
| CN108171222B (en) | Real-time video classification method and device based on multi-stream neural network | |
| CN115331310B (en) | Multi-user gesture recognition method, device and medium | |
| US11770617B2 (en) | Method for tracking target object | |
| CN117523560A (en) | Semantic segmentation method, device and storage medium | |
| CN117351556A (en) | Gesture recognition method, device, vehicle and storage medium | |
| CN115731115A (en) | A data processing method and device | |
| CN110826469A (en) | A person detection method, device and computer readable storage medium | |
| CN112949827A (en) | Neural network generation, data processing and intelligent driving control method and device | |
| CN114419093B (en) | Target tracking method, device, equipment and storage medium | |
| CN116051848B (en) | Image feature extraction method, network model, device and equipment | |
| US20250095182A1 (en) | Unified simultaneous optical flow and depth estimation | |
| Cui et al. | UST-SU: a U-shaped video prediction network based on partial autoregression | |
| CN115995069A (en) | Training method for lane line detection model |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |