[go: up one dir, main page]

CN116055902A - Image generation method and device, image sensor and storage medium - Google Patents

Image generation method and device, image sensor and storage medium Download PDF

Info

Publication number
CN116055902A
CN116055902A CN202211729410.0A CN202211729410A CN116055902A CN 116055902 A CN116055902 A CN 116055902A CN 202211729410 A CN202211729410 A CN 202211729410A CN 116055902 A CN116055902 A CN 116055902A
Authority
CN
China
Prior art keywords
image signal
digital image
signal value
correction
target pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211729410.0A
Other languages
Chinese (zh)
Other versions
CN116055902B (en
Inventor
谌黎明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ruishi Zhixin Technology Co ltd
Original Assignee
Shenzhen Ruishi Zhixin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ruishi Zhixin Technology Co ltd filed Critical Shenzhen Ruishi Zhixin Technology Co ltd
Priority to CN202211729410.0A priority Critical patent/CN116055902B/en
Publication of CN116055902A publication Critical patent/CN116055902A/en
Application granted granted Critical
Publication of CN116055902B publication Critical patent/CN116055902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

本申请提供了一种图像生成方法、装置、图像传感器及存储介质,该方法包括:当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数;根据校正参数对目标像素位置相应的原始数字图像信号值进行校正,得到校正后数字图像信号值;基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值;结合所有像素位置的有效数字图像信号值生成目标输出图像。通过本申请方案的实施,对部分像素位置的原始数字图像信号值进行局部校正,然后结合所有像素位置的有效数字图像信号值生成目标输出图像,以消除传感器输出信号中所引入的噪声因素,提高了目标输出图像的质量。

Figure 202211729410

The present application provides an image generation method, device, image sensor and storage medium, the method includes: after the image sensor generates the original image file at the actual working time, call the target pixel position and the corresponding target pixel position stored in the preset correction file Correction parameters; correct the original digital image signal value corresponding to the target pixel position according to the correction parameter to obtain the corrected digital image signal value; calculate the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculate the effective digital image signal value based on the original digital image signal value The image signal value computes the effective digital image signal values for pixel positions other than the target pixel position; combines the effective digital image signal values for all pixel positions to generate the target output image. Through the implementation of the scheme of this application, the original digital image signal values of some pixel positions are locally corrected, and then the target output image is generated by combining the effective digital image signal values of all pixel positions, so as to eliminate the noise factor introduced in the sensor output signal and improve the quality of the target output image.

Figure 202211729410

Description

一种图像生成方法、装置、图像传感器及存储介质An image generation method, device, image sensor and storage medium

技术领域technical field

本申请涉及图像传感器技术领域,尤其涉及一种图像生成方法、装置、图像传感器及存储介质。The present application relates to the technical field of image sensors, and in particular to an image generation method, device, image sensor and storage medium.

背景技术Background technique

随着科学技术的不断发展,图像传感器广泛应用于智能手机、数码相机、安防摄像头等产品领域,目前,图像传感器在工作状态下,通常直接获取原始图像文件中的原始数字图像信号值生成图像,而并未考虑噪声因素影响,从而导致最终所生成的图像的质量较低,尤其在图像传感器生成彩色图像的场景下,针对基于拜耳阵列的图像传感器,需要采用插值方式生成彩色图像,噪声因素对最终生成的彩色图像的质量影响更甚。With the continuous development of science and technology, image sensors are widely used in smart phones, digital cameras, security cameras and other product fields. At present, image sensors usually directly obtain the original digital image signal value in the original image file to generate an image under working conditions. However, the influence of noise factors is not considered, resulting in low quality of the final generated image, especially in the scene where the image sensor generates a color image, for the image sensor based on the Bayer array, it is necessary to use an interpolation method to generate a color image, and the noise factor has a great impact on the image quality. The quality of the resulting color image is even more affected.

发明内容Contents of the invention

本申请实施例提供了一种图像生成方法、装置、图像传感器及存储介质,至少能够解决相关技术中的图像传感器直接基于原始图像文件中的原始数字图像信号值生成图像,所导致的图像质量较低的问题。Embodiments of the present application provide an image generation method, device, image sensor, and storage medium, which can at least solve the problem of poor image quality caused by image sensors in related technologies directly generating images based on original digital image signal values in original image files. low problem.

本申请实施例第一方面提供了一种图像生成方法,包括:当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数;其中,所述原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;根据所述校正参数对所述目标像素位置相应的所述原始数字图像信号值进行校正,得到校正后数字图像信号值;基于所述校正后数字图像信号值计算所述目标像素位置的有效数字图像信号值,以及基于所述原始数字图像信号值计算除所述目标像素位置之外的其它像素位置的所述有效数字图像信号值;结合所有所述像素位置的所述有效数字图像信号值生成目标输出图像。The first aspect of the embodiment of the present application provides an image generation method, including: after the image sensor generates the original image file at the actual working time, calling the target pixel position and the corresponding correction parameters stored in the preset correction file; wherein, The original image file includes the original digital image signal value corresponding to each pixel position in the overall pixel array; the original digital image signal value corresponding to the target pixel position is corrected according to the correction parameter to obtain a corrected digital image signal value; calculate the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculate the effective digital image signal value of other pixel positions except the target pixel position based on the original digital image signal value digital image signal values; combining said effective digital image signal values for all said pixel locations to generate a target output image.

本申请实施例第二方面提供了一种图像生成装置,包括:调用模块,用于当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数;其中,所述原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;校正模块,用于根据所述校正参数对所述目标像素位置相应的所述原始数字图像信号值进行校正,得到校正后数字图像信号值;计算模块,用于基于所述校正后数字图像信号值计算所述目标像素位置的有效数字图像信号值,以及基于所述原始数字图像信号值计算除所述目标像素位置之外的其它像素位置的所述有效数字图像信号值;生成模块,用于结合所有所述像素位置的所述有效数字图像信号值生成目标输出图像。The second aspect of the embodiment of the present application provides an image generating device, including: a calling module, used to call the target pixel positions stored in the preset correction file and the corresponding Correction parameters; wherein, the original image file includes an original digital image signal value corresponding to each pixel position in the overall pixel array; a correction module is used to correct the original digital image signal corresponding to the target pixel position according to the correction parameter Value is corrected to obtain the corrected digital image signal value; the calculation module is used to calculate the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculate the division based on the original digital image signal value The effective digital image signal values of pixel positions other than the target pixel position; a generating module, configured to combine the effective digital image signal values of all the pixel positions to generate a target output image.

本申请实施例第三方面提供了一种图像传感器,包括:存储器及处理器,其中,处理器用于执行存储在存储器上的计算机程序,处理器执行计算机程序时,实现上述本申请实施例第一方面提供的图像生成方法中的各步骤。The third aspect of the embodiment of the present application provides an image sensor, including: a memory and a processor, wherein the processor is used to execute a computer program stored in the memory, and when the processor executes the computer program, the above-mentioned first embodiment of the present application is realized. Each step in the image generation method provided by the aspect.

本申请实施例第四方面提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时,实现上述本申请实施例第一方面提供的图像生成方法中的各步骤。The fourth aspect of the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the above-mentioned steps in the image generation method provided by the first aspect of the embodiment of the present application are implemented. .

由上可见,根据本申请方案所提供的图像生成方法、装置、图像传感器及存储介质,当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数,其中,原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;根据校正参数对目标像素位置相应的原始数字图像信号值进行校正,得到校正后数字图像信号值;基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值;结合所有像素位置的有效数字图像信号值生成目标输出图像。通过本申请方案的实施,对部分像素位置的原始数字图像信号值进行局部校正,然后结合所有像素位置的有效数字图像信号值生成目标输出图像,以消除传感器输出信号中所引入的噪声因素,提高了目标输出图像的质量。It can be seen from the above that, according to the image generation method, device, image sensor and storage medium provided by the scheme of the present application, after the image sensor generates the original image file at the actual working time, the target pixel position stored in the preset correction file and the corresponding correction parameters, wherein the original image file includes the original digital image signal value corresponding to each pixel position in the overall pixel array; the original digital image signal value corresponding to the target pixel position is corrected according to the correction parameter to obtain the corrected digital image signal value; Calculate the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculate the effective digital image signal value of other pixel positions except the target pixel position based on the original digital image signal value; combine the significant figures of all pixel positions The image signal values generate the target output image. Through the implementation of the scheme of this application, the original digital image signal values of some pixel positions are locally corrected, and then the target output image is generated by combining the effective digital image signal values of all pixel positions, so as to eliminate the noise factor introduced in the sensor output signal and improve the quality of the target output image.

附图说明Description of drawings

图1为本申请一实施例提供的图像生成方法的基本流程示意图;FIG. 1 is a schematic diagram of the basic flow of an image generation method provided by an embodiment of the present application;

图2为本申请一实施例提供的一种整体像素阵列的赋值示意图;Fig. 2 is a schematic diagram of assignment of an overall pixel array provided by an embodiment of the present application;

图3为本申请一实施例提供的图像生成方法的细化流程示意图;FIG. 3 is a schematic diagram of a refinement process of an image generation method provided by an embodiment of the present application;

图4为本申请一实施例提供的图像生成装置的程序模块示意图;FIG. 4 is a schematic diagram of program modules of an image generation device provided by an embodiment of the present application;

图5为本申请一实施例提供的图像传感器的结构示意图。FIG. 5 is a schematic structural diagram of an image sensor provided by an embodiment of the present application.

具体实施方式Detailed ways

为使得本申请的发明目的、特征、优点能够更加的明显和易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而非全部实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described The embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.

在本申请实施例的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are only used for descriptive purposes, and cannot be interpreted as indicating or implying relative importance or implicitly indicating the indicated technical features. quantity. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, "plurality" means two or more, unless otherwise specifically defined.

下面将结合附图详细说明本申请实施例的一种图像生成方法、装置、图像传感器及存储介质。An image generation method, device, image sensor, and storage medium according to the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

为了解决相关技术中的图像传感器直接基于原始图像文件中的原始数字图像信号值生成目标输出图像,所导致的目标输出图像质量较低的问题,本申请一实施例提供了一种图像生成方法,应用于图像传感器,该图像传感器的整体像素阵列优选的可以配置为APS(Active-Pixel Sensor,有源像素传感器)像素,有源像素传感器是一种常用的图像传感器,其中每个像素传感器单元具有光电检测器和至少一个有源晶体管,在金属氧化物半导体(MOS)有源像素传感器中,MOS场效应晶体管(MOSFET)用作放大器,APS的类型有多种,包括早期的NMOS型APS和更常见的CMOS型APS。In order to solve the problem in the related art that the image sensor directly generates the target output image based on the original digital image signal value in the original image file, resulting in low quality of the target output image, an embodiment of the present application provides an image generation method, Applied to an image sensor, the overall pixel array of the image sensor can preferably be configured as an APS (Active-Pixel Sensor, active pixel sensor) pixel, and the active pixel sensor is a commonly used image sensor, wherein each pixel sensor unit has A photodetector and at least one active transistor. In a metal-oxide-semiconductor (MOS) active pixel sensor, a MOS field-effect transistor (MOSFET) is used as an amplifier. There are many types of APS, including early NMOS-type APSs and more Common CMOS type APS.

如图1为本申请一实施例提供的图像生成方法的基本流程图,该图像生成方法具体包括以下的步骤:Figure 1 is a basic flowchart of an image generation method provided by an embodiment of the present application, the image generation method specifically includes the following steps:

步骤101、当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数。Step 101, after the image sensor generates the original image file at the actual working moment, call the target pixel position and the corresponding correction parameters stored in the preset correction file.

具体的,在本实施例中,当图像传感器进入工作状态时,整体像素阵列中各像素配置的光电检测器同步进行感光检测,从而生成原始图像文件(也即RAW文件),原始图像文件指图像传感器将捕捉到的光信号转化为数字信号的原始数据,针对APS图像传感器,原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值。应当理解的是,本实施例的图像传感器经过测试阶段后标定有校正文件,用于在实际工作阶段进行数字图像信号值校正。在优选实施方式中,上述数字图像信号值可以为灰度值。Specifically, in this embodiment, when the image sensor enters the working state, the photodetectors configured by each pixel in the overall pixel array perform photosensitive detection synchronously, thereby generating an original image file (that is, a RAW file). The original image file refers to an image The sensor converts the captured light signal into the original data of the digital signal. For the APS image sensor, the original image file includes the original digital image signal value corresponding to each pixel position in the overall pixel array. It should be understood that the image sensor in this embodiment is calibrated with a calibration file after the testing phase, which is used to correct the digital image signal value in the actual working phase. In a preferred embodiment, the above-mentioned digital image signal values may be grayscale values.

在本实施例一种可选方式中,上述调用预设校正文件中所存储的目标像素位置以及相应的校正参数的步骤之前,还包括:获取处于暗场条件的图像传感器在测试工作时刻生成的原始图像文件;基于原始图像文件中原始数字图像信号值计算关联于暗电流的平均噪声数字图像信号值;根据平均噪声数字图像信号值生成校正文件。In an optional manner of this embodiment, before the above-mentioned step of calling the target pixel position stored in the preset correction file and the corresponding correction parameters, it also includes: obtaining the An original image file; calculating an average noise digital image signal value associated with dark current based on the original digital image signal value in the original image file; generating a correction file according to the average noise digital image signal value.

具体的,在实际应用中,图像传感器的电路存在着暗电流,导致在没有光线照射的时候,像素电路也会产生一定的输出电压,进而产生暗电流。那么在光照条件下,图像传感器的输出信号为有效信号叠加暗电流信号,导致输出信号存在有明显的暗噪声,当暗电流过大时会对输出图像的通透性、对比度、清晰度等造成显著影响。Specifically, in practical applications, there is dark current in the circuit of the image sensor, so that when there is no light irradiation, the pixel circuit will also generate a certain output voltage, thereby generating dark current. Then under lighting conditions, the output signal of the image sensor is an effective signal superimposed on the dark current signal, resulting in obvious dark noise in the output signal. When the dark current is too large, it will affect the permeability, contrast, and clarity of the output image. Significantly affected.

基于此,本实施例在测试阶段控制图像传感器在暗场条件下工作,所生成的原始数字图像信号值对应于暗电流信号,通过对所有像素位置的原始数字图像信号值求取平均值,即可得到关联于暗电流的平均噪声数字图像信号值,接下来再基于平均噪声数字图像信号值标定校正文件。应当说明的是,本实施例可以控制图像传感器的整体像素阵列中部分像素阵列区域处于暗场条件,也即将整体像素阵列中部分像素作为遮光像素,令部分像素避光工作,以此来求取平均噪声数字图像信号值。Based on this, the present embodiment controls the image sensor to work under dark field conditions during the test phase, and the generated original digital image signal value corresponds to the dark current signal, by calculating the average value of the original digital image signal values at all pixel positions, that is The average noise digital image signal value associated with the dark current can be obtained, and then the correction file is calibrated based on the average noise digital image signal value. It should be noted that this embodiment can control part of the pixel array area in the overall pixel array of the image sensor to be in the dark field condition, that is, some pixels in the overall pixel array are used as light-shielding pixels, and some pixels are protected from light, so as to obtain Average noise digital image signal value.

进一步地,在本实施例一种可选方式中,上述根据平均噪声数字图像信号值生成校正文件的步骤,包括:获取平均噪声数字图像信号值的小数部分数值,以及获取整体像素阵列的总像素数量;基于小数部分数值以及总像素数量生成校正文件。Further, in an optional manner of this embodiment, the above-mentioned step of generating the correction file according to the average noise digital image signal value includes: obtaining the value of the fractional part of the average noise digital image signal value, and obtaining the total pixel value of the overall pixel array Quantity; generates correction files based on fractional values and total pixel counts.

具体的,在相关技术中,在对图像传感器进行灰度校正时,通常并未考虑暗电流信号的小数部分的校正,以平均噪声数字图像信号值为4.4,通常仅会考虑对暗电流导致的平均噪声数字图像信号值的整数部分进行修正,也即将平均数字图像信号值的小数部分0.4作为有效信号分量,从而会导致图像偏色以及比例失调,这种比例失调会改变RGB之间的比例从而产生偏色现象。而在本实施例中,将平均噪声数字图像信号值的小数部分也确认为待校正暗电流信号,并依此生成校正文件,以提高实际工作过程中图像传感器所生成的目标输出图像的质量。Specifically, in the related art, the correction of the fractional part of the dark current signal is usually not considered when performing gray scale correction on the image sensor, and the average noise digital image signal value is 4.4, and usually only the correction of the dark current caused by The integer part of the average noise digital image signal value is corrected, that is, the fractional part 0.4 of the average digital image signal value is used as an effective signal component, which will cause image color cast and proportional imbalance. This proportional imbalance will change the ratio between RGB and thus Color cast occurs. In this embodiment, the fractional part of the average noise digital image signal value is also confirmed as the dark current signal to be corrected, and a correction file is generated accordingly, so as to improve the quality of the target output image generated by the image sensor in the actual working process.

更进一步地,在本实施例一种可选方式中,上述基于小数部分数值以及总像素数量生成校正文件的步骤,包括:将小数部分数值以及总像素数量输入至预设指标计算公式,计算待校正像素数量以及校正参数;基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成校正文件;其中,所有目标像素位置的校正参数相等。Furthermore, in an optional manner of this embodiment, the above-mentioned step of generating the correction file based on the decimal value and the total number of pixels includes: inputting the decimal value and the total number of pixels into the preset index calculation formula, and calculating Correcting the number of pixels and correction parameters; generating a correction file based on the correction parameters and target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected; wherein, the correction parameters of all target pixel positions are equal.

上述指标计算公式可以表示为:The above index calculation formula can be expressed as:

a*b=C(m*n),a*b=C(m*n),

C*n=1;C*n=1;

其中,a表示小数部分数值,b表示总像素数量,C表示已知常数,m表示待校正像素数量,n表示校正参数且取值为负值。Among them, a represents the value of the decimal part, b represents the total number of pixels, C represents a known constant, m represents the number of pixels to be corrected, n represents the correction parameter and its value is a negative value.

具体的,本实施例将小数部分数值与总像素数量进行乘法运算,所得即为单位像素的小数部分数值回归至图像传感器整体像素阵列的总值,最终乘积也即整体像素阵列所需校正的平均暗电流信号的小数部分数值的总值。如图2所示为本实施例提供的一种整体像素阵列的赋值示意图,图中标记有“-1”的像素位置均为本实施例的目标像素位置,该图示出了将整体像素阵列中10个像素位置作为待校正像素,且这10个待校正像素相应的校正参数均为“-1”。在本实施例中,C的取值优选的可以取-1,那么n的取值也即-1,继续承接前述平均噪声数字图像信号值的小数部分为0.4的举例,若整体像素阵列的尺寸为5*5,也即整体像素阵列包括25个像素,那么m的取值为10,也即从总共25个像素中选取10个像素作为待校正像素,且将这些像素的校正参数均赋为-1。值得注意的是,本实施例图2示意的整体像素阵列的尺寸仅为一种示例性说明,并非限定实际应用中的像素阵列尺寸。Specifically, in this embodiment, the value of the fractional part is multiplied by the total number of pixels, and the result is the return of the value of the fractional part of the unit pixel to the total value of the overall pixel array of the image sensor, and the final product is the average value of the correction required by the overall pixel array The sum of the fractional part values of the dark current signal. Figure 2 is a schematic diagram of the assignment of an overall pixel array provided by this embodiment. The pixel positions marked with "-1" in the figure are the target pixel positions of this embodiment. This figure shows that the overall pixel array The 10 pixel positions in are used as the pixels to be corrected, and the corresponding correction parameters of these 10 pixels to be corrected are all "-1". In this embodiment, the value of C can preferably be -1, then the value of n is also -1, continuing the above-mentioned example where the fractional part of the average noise digital image signal value is 0.4, if the size of the overall pixel array is 5*5, that is, the overall pixel array includes 25 pixels, then the value of m is 10, that is, 10 pixels are selected from a total of 25 pixels as the pixels to be corrected, and the correction parameters of these pixels are assigned as -1. It should be noted that the size of the overall pixel array shown in FIG. 2 of this embodiment is only an exemplary illustration, and does not limit the size of the pixel array in practical applications.

当然,在实际应用中,C的取值和/或n的取值还可以为其它值,例如,若C取-0.5,n仍取-1,那么m的取值则为20,也即从总共25个像素中选取20个像素作为待校正像素,且均赋予校正参数值-1;或者,C的取值为-1,n的取值为-2,那么m的取值则为5,也即从总共25个像素中选取5个像素作为待校正像素,且均赋予校正参数值-2。应当理解的是,本实施例上述描述仅为部分示例性实施方式,并不构成本实施例的唯一限定。Of course, in practical applications, the value of C and/or n can also be other values. For example, if C takes -0.5 and n still takes -1, then the value of m is 20, that is, from Select 20 pixels from a total of 25 pixels as the pixels to be corrected, and assign the correction parameter value -1; or, the value of C is -1, the value of n is -2, then the value of m is 5, That is, 5 pixels are selected from a total of 25 pixels as pixels to be corrected, and all of them are given a correction parameter value of -2. It should be understood that, the foregoing description of this embodiment is only some exemplary implementations, and does not constitute the only limitation of this embodiment.

步骤102、根据校正参数对目标像素位置相应的原始数字图像信号值进行校正,得到校正后数字图像信号值。Step 102: Correct the original digital image signal value corresponding to the target pixel position according to the correction parameter to obtain a corrected digital image signal value.

具体的,在本实施例中,为了对暗电流信号所导致的平均噪声数字图像信号值的小数部分进行校正,基于校正文件从整体像素阵列中确定待校正的部分像素位置,并采用校正文件中所预置的校正参数对原始数字图像信号值进行第一阶段校正,也即对局部像素的原始信号进行校正,实现平均噪声数字图像信号值的小数部分的校正。Specifically, in this embodiment, in order to correct the fractional part of the average noise digital image signal value caused by the dark current signal, the partial pixel positions to be corrected are determined from the overall pixel array based on the correction file, and the correction file is used. The preset correction parameters perform the first-stage correction on the original digital image signal value, that is, correct the original signal of local pixels, and realize the correction of the fractional part of the average noise digital image signal value.

步骤103、基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值。Step 103 : Calculate the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculate the effective digital image signal value of other pixel positions except the target pixel position based on the original digital image signal value.

具体的,本实施例的再进一步对整体像素阵列中所有像素进行第二阶段校正,可以理解为对平均噪声数字图像信号值的整数部分进行校正,其中,针对目标像素位置,校正基础为经过第一阶段校正之后的校正后数字图像信号值,针对整体像素阵列上的其它像素位置,校正基础则为原始图像文件中相应的原始数字图像信号值。Specifically, in this embodiment, further performing the second-stage correction on all pixels in the overall pixel array can be understood as correcting the integer part of the average noise digital image signal value, wherein, for the target pixel position, the basis for correction is after the first For the corrected digital image signal value after the one-stage correction, for other pixel positions on the overall pixel array, the correction basis is the corresponding original digital image signal value in the original image file.

在本实施例一种可选实施方式中,上述基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值的步骤,包括:计算校正后数字图像信号值与平均噪声数字图像信号值的整数部分数值的差值,得到目标像素位置的有效数字图像信号值,以及计算除目标像素位置之外的其它像素位置的原始数字图像信号值与整数部分数值的差值,得到其它像素位置的有效数字图像信号值。In an optional implementation manner of this embodiment, the above-mentioned effective digital image signal value of the target pixel position is calculated based on the corrected digital image signal value, and the effective digital image signal value of other pixel positions other than the target pixel position is calculated based on the original digital image signal value. The step of the effective digital image signal value includes: calculating the difference between the corrected digital image signal value and the integer value of the average noise digital image signal value, obtaining the effective digital image signal value of the target pixel position, and calculating the difference between the target pixel position The difference between the original digital image signal value of other pixel positions and the value of the integer part is obtained to obtain the effective digital image signal value of other pixel positions.

具体的,本实施例以前述平均噪声数字图像信号值为4.4进一步进行举例说明,平均噪声数字图像信号值的整数部分也即4,那么在进行第二阶段校正时,针对目标像素位置的校正后数字图像信号值,将其减去4之后所得计算值即为目标像素位置的有效数字图像信号值,针对其它像素位置的原始数字图像信号值,同理,将其减去4之后所得计算值即为其它像素位置的有效数字图像信号值。Specifically, in this embodiment, the aforementioned average noise digital image signal value is 4.4 for further illustration. The integer part of the average noise digital image signal value is also 4. Then, when performing the second-stage correction, after correction of the target pixel position The digital image signal value, the calculated value obtained after subtracting 4 is the effective digital image signal value of the target pixel position, and for the original digital image signal value of other pixel positions, similarly, the calculated value obtained after subtracting 4 is is the effective digital image signal value of other pixel positions.

步骤104、结合所有像素位置的有效数字图像信号值生成目标输出图像。Step 104, combining effective digital image signal values at all pixel positions to generate a target output image.

具体的,经过前述校正过程,对像素的原始数字图像信号值进行了暗电流噪声修正,从而最终所得均为有效数字图像信号值,最终所生成的目标输出图像排除了传感器电路自身的暗电流影响,有效提高了输出的目标输出图像质量。应当理解的是,本实施例的目标输出图像的类型可以为灰度图像或彩色图像。Specifically, after the aforementioned correction process, the original digital image signal value of the pixel is corrected for dark current noise, so that the final result is an effective digital image signal value, and the finally generated target output image excludes the influence of the dark current of the sensor circuit itself , effectively improving the output target output image quality. It should be understood that the type of the target output image in this embodiment may be a grayscale image or a color image.

在本实施例一种可选实施方式中,上述将小数部分数值以及总像素数量输入至预设指标计算公式,计算待校正像素数量以及校正参数的步骤之前,还包括:分别根据不同场景动态等级确定相应的已知常数。相应的,基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成校正文件的步骤,包括:针对各场景动态等级,基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成相应的校正文件。相应的,调用预设校正文件中所存储的目标像素位置以及相应的校正参数的步骤,包括:根据实际场景动态等级调用相应的校正文件,并获取校正文件中所存储的目标像素位置以及相应的校正参数。In an optional implementation manner of this embodiment, before the step of inputting the fractional part value and the total number of pixels into the preset index calculation formula, and calculating the number of pixels to be corrected and the correction parameters, it also includes: respectively according to different scene dynamic levels Determine the corresponding known constants. Correspondingly, the step of generating the correction file based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected includes: for each scene dynamic level, based on the correction parameters and the selected from the overall pixel array Corresponding to the target pixel position corresponding to the number of pixels to be corrected, a corresponding correction file is generated. Correspondingly, the step of calling the target pixel position and the corresponding correction parameters stored in the preset correction file includes: calling the corresponding correction file according to the actual scene dynamic level, and obtaining the target pixel position and the corresponding correction parameter stored in the correction file. Calibration parameters.

具体的,本实施例考虑到图像传感器的实际成像场景有所不同,特别是场景的动态等级有所不同,例如运动拍摄场景下或高环境亮度下的动态等级较高,静止拍摄场景下或低环境亮度下的动态等级则相对较低。为了保证不同成像场景下均具备较好的成像质量,本实施例针对不同场景动态等级关联不同的已知常数C的取值,并依此针对不同场景动态等级生成多个不同的校正文件,从而在图像传感器的实际工作过程中,可以根据实际场景动态等级适应性调用校正文件,以提高本实施例的数字图像信号值校正机制在不同成像场景下的适用性。Specifically, this embodiment considers that the actual imaging scene of the image sensor is different, especially the dynamic level of the scene is different, for example, the dynamic level is higher in a moving shooting scene or under high ambient brightness, and the dynamic level is higher in a still shooting scene or low. Dynamic levels in ambient light are relatively low. In order to ensure better imaging quality under different imaging scenes, this embodiment associates different values of the known constant C for different scene dynamic levels, and accordingly generates multiple different correction files for different scene dynamic levels, so that In the actual working process of the image sensor, the correction file can be called adaptively according to the dynamic level of the actual scene, so as to improve the applicability of the digital image signal value correction mechanism of this embodiment in different imaging scenes.

进一步地,在本实施例一种可选实施方式中,上述基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成相应的校正文件的步骤之前,还包括:根据场景动态等级相应确定整体像素阵列中的感兴趣阵列区域;从感兴趣阵列区域中选取对应于待校正像素数量的目标像素位置。Further, in an optional implementation manner of this embodiment, before the above-mentioned step of generating a corresponding correction file based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected, further includes: Correspondingly determine the array area of interest in the overall pixel array according to the dynamic level of the scene; select the target pixel position corresponding to the number of pixels to be corrected from the array area of interest.

具体的,在实际应用中,所需参与平均噪声数字图像信号值校正的目标像素位置可以从整体像素阵列中随机选取,而为了提高传感器成像行为与实际成像场景的适配性,本实施例根据实际场景动态等级适应性选取整体像素阵列中的特定阵列区域作为感兴趣阵列区域,并从感兴趣阵列区域选取目标像素位置。Specifically, in practical applications, the target pixel position required to participate in the correction of the average noise digital image signal value can be randomly selected from the overall pixel array, and in order to improve the adaptability of the sensor imaging behavior to the actual imaging scene, this embodiment according to The actual scene dynamic level adaptively selects a specific array area in the overall pixel array as an array area of interest, and selects a target pixel position from the array area of interest.

基于本申请上述实施例的技术方案,当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数,其中,原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;根据校正参数对目标像素位置相应的原始数字图像信号值进行校正,得到校正后数字图像信号值;基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值;结合所有像素位置的有效数字图像信号值生成目标输出图像。通过本申请方案的实施,对部分像素位置的原始数字图像信号值进行局部校正,然后结合所有像素位置的有效数字图像信号值生成目标输出图像,以消除传感器输出信号中所引入的噪声因素,避免了图像偏色以及比例失调,保证了图像平衡,提高了目标输出图像的质量。Based on the technical solutions of the above-mentioned embodiments of the present application, after the image sensor generates the original image file at the actual working time, call the target pixel position and the corresponding correction parameters stored in the preset correction file, wherein the original image file includes the overall pixel array The original digital image signal value corresponding to each pixel position in the center; the original digital image signal value corresponding to the target pixel position is corrected according to the correction parameters, and the corrected digital image signal value is obtained; the effective value of the target pixel position is calculated based on the corrected digital image signal value digital image signal values, and calculating effective digital image signal values at pixel positions other than the target pixel position based on the original digital image signal values; combining effective digital image signal values at all pixel positions to generate a target output image. Through the implementation of the scheme of this application, the original digital image signal values of some pixel positions are locally corrected, and then the target output image is generated by combining the effective digital image signal values of all pixel positions, so as to eliminate the noise factor introduced in the sensor output signal and avoid It eliminates image color cast and proportional imbalance, ensures image balance, and improves the quality of the target output image.

接下来,本实施例进一步还提供了一种细化的图像生成方法,如图3所示为本申请一实施例提供的一种细化的图像生成方法的流程示意图,该图像生成方法具体包括如下步骤:Next, this embodiment further provides a refined image generation method, as shown in FIG. 3 , which is a schematic flowchart of a refined image generation method provided by an embodiment of the present application. The image generation method specifically includes Follow the steps below:

步骤301、获取处于暗场条件的图像传感器在测试工作时刻生成的原始图像文件;Step 301. Obtain the original image file generated by the image sensor under the dark field condition during the test operation;

步骤302、基于原始图像文件中原始灰度值计算关联于暗电流的平均噪声灰度值;Step 302, calculating the average noise gray value associated with the dark current based on the original gray value in the original image file;

步骤303、获取平均噪声灰度值的小数部分数值,以及获取整体像素阵列的总像素数量;Step 303, obtaining the value of the fractional part of the average noise gray value, and obtaining the total number of pixels of the overall pixel array;

步骤304、将小数部分数值以及总像素数量输入至预设指标计算公式,计算待校正像素数量以及像素灰度校正值;Step 304, input the value of the decimal part and the total number of pixels into the preset index calculation formula, and calculate the number of pixels to be corrected and the pixel gray scale correction value;

步骤305、基于像素灰度校正值以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成校正文件;Step 305, based on the pixel grayscale correction value and the target pixel position selected from the overall pixel array corresponding to the number of pixels to be corrected, a correction file is generated;

步骤306、当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的像素灰度校正值;Step 306: After the image sensor generates the original image file at the actual working moment, call the target pixel position and the corresponding pixel grayscale correction value stored in the preset correction file;

步骤307、将目标像素位置相应的原始灰度值与像素灰度校正值作差,得到校正后灰度值;Step 307, making a difference between the original gray value corresponding to the target pixel position and the corrected pixel gray value to obtain a corrected gray value;

步骤308、将目标像素位置的校正后灰度值与平均噪声灰度值的整数部分数值作差,得到目标像素位置的有效灰度值,以及将其它像素位置的原始灰度值与整数部分数值作差,得到其它像素位置的有效灰度值;Step 308, taking the difference between the corrected gray value of the target pixel position and the integer value of the average noise gray value to obtain the effective gray value of the target pixel position, and calculating the difference between the original gray value of other pixel positions and the integer value Make a difference to get the effective gray value of other pixel positions;

步骤309、结合所有像素位置的有效灰度值生成灰度图像。Step 309 , generating a grayscale image by combining effective grayscale values of all pixel positions.

应当理解的是,本实施例中各步骤的序号的大小并不意味着步骤执行顺序的先后,各步骤的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成唯一限定。It should be understood that the sequence numbers of the steps in this embodiment do not mean the order in which the steps are executed, and the execution order of the steps should be determined by their functions and internal logic, rather than constituting the implementation process of the embodiment of the present application. Uniquely limited.

图4为本申请一实施例提供的一种图像生成装置,该图像生成装置可用于实现前述实施例中的图像生成方法,该图像生成装置主要包括:Fig. 4 is an image generation device provided by an embodiment of the present application, the image generation device can be used to implement the image generation method in the foregoing embodiment, the image generation device mainly includes:

调用模块401,用于当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数;其中,原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;The calling module 401 is used to call the target pixel position and the corresponding correction parameters stored in the preset correction file after the image sensor generates the original image file at the actual working time; wherein, the original image file includes the positions of each pixel in the overall pixel array The corresponding original digital image signal value;

校正模块402,用于根据校正参数对目标像素位置相应的原始数字图像信号值进行校正,得到校正后数字图像信号值;A correction module 402, configured to correct the original digital image signal value corresponding to the target pixel position according to the correction parameter, to obtain the corrected digital image signal value;

计算模块403,用于基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值;Calculation module 403, for calculating the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculating the effective digital image signal value of other pixel positions except the target pixel position based on the original digital image signal value;

生成模块404,用于结合所有像素位置的有效数字图像信号值生成目标输出图像。A generating module 404, configured to combine effective digital image signal values at all pixel positions to generate a target output image.

在本实施例的一些实施方式中,该图像生成装置还包括:获取模块,用于获取处于暗场条件的图像传感器在测试工作时刻生成的原始图像文件;相应的,计算模块还用于基于原始图像文件中原始数字图像信号值计算关联于暗电流的平均噪声数字图像信号值;生成模块还用于根据平均噪声数字图像信号值生成校正文件。In some implementations of this embodiment, the image generation device further includes: an acquisition module, configured to acquire the original image file generated by the image sensor in dark field conditions at the time of the test; correspondingly, the calculation module is also configured to The original digital image signal value in the image file calculates the average noise digital image signal value associated with the dark current; the generation module is also used to generate a correction file according to the average noise digital image signal value.

在本实施例的一些实施方式中,生成模块在执行上述根据平均噪声数字图像信号值生成校正文件的功能时,具体用于:获取平均噪声数字图像信号值的小数部分数值,以及获取整体像素阵列的总像素数量;基于小数部分数值以及总像素数量生成校正文件。In some implementations of this embodiment, when the generation module executes the above-mentioned function of generating the correction file according to the average noise digital image signal value, it is specifically used to: obtain the fractional value of the average noise digital image signal value, and obtain the overall pixel array The total number of pixels; generate a correction file based on the fractional value and the total number of pixels.

在本实施例的一些实施方式中,生成模块在执行上述基于小数部分数值以及总像素数量生成校正文件的功能时,具体用于:将小数部分数值以及总像素数量输入至预设指标计算公式,计算待校正像素数量以及校正参数;基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成校正文件。该指标计算公式表示为:In some implementations of this embodiment, when the generation module executes the above-mentioned function of generating the correction file based on the decimal part value and the total pixel quantity, it is specifically used to: input the decimal part value and the total pixel quantity into the preset index calculation formula, Calculate the number of pixels to be corrected and the correction parameters; based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected, a correction file is generated. The calculation formula of this indicator is expressed as:

a*b=C(m*n),a*b=C(m*n),

C*n=1;C*n=1;

其中,a表示小数部分数值,b表示总像素数量,C表示已知常数,m表示待校正像素数量,n表示校正参数且取值为负值。Among them, a represents the value of the decimal part, b represents the total number of pixels, C represents a known constant, m represents the number of pixels to be corrected, n represents the correction parameter and its value is a negative value.

在本实施例的一些实施方式中,计算模块在执行上述基于校正后数字图像信号值计算目标像素位置的有效数字图像信号值,以及基于原始数字图像信号值计算除目标像素位置之外的其它像素位置的有效数字图像信号值的功能时,具体用于:计算校正后数字图像信号值与平均噪声数字图像信号值的整数部分数值的差值,得到目标像素位置的有效数字图像信号值,以及计算除目标像素位置之外的其它像素位置的原始数字图像信号值与整数部分数值的差值,得到其它像素位置的有效数字图像信号值。In some implementations of this embodiment, the calculation module calculates the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculates the value of other pixels except the target pixel position based on the original digital image signal value. When the function of the effective digital image signal value of the position is used, it is specifically used to: calculate the difference between the corrected digital image signal value and the integer value of the average noise digital image signal value, obtain the effective digital image signal value of the target pixel position, and calculate The difference between the original digital image signal value of other pixel positions except the target pixel position and the value of the integer part is obtained to obtain the effective digital image signal value of other pixel positions.

在本实施例的一些实施方式中,该图像生成装置还包括:确定模块,用于分别根据不同场景动态等级确定相应的已知常数。相应的,生成模块在执行上述基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成校正文件的功能时,具体用于:针对各场景动态等级,基于校正参数以及从整体像素阵列中选取的对应于待校正像素数量的目标像素位置,生成相应的校正文件。调用模块具体用于:根据实际场景动态等级调用相应的校正文件,并获取校正文件中所存储的目标像素位置以及相应的校正参数。In some implementations of this embodiment, the image generation device further includes: a determining module, configured to determine corresponding known constants according to different scene dynamic levels. Correspondingly, when the generation module executes the above-mentioned function of generating the correction file based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected, it is specifically used to: for each scene dynamic level, based on the correction parameters And the target pixel position corresponding to the number of pixels to be corrected is selected from the overall pixel array to generate a corresponding correction file. The calling module is specifically used for: calling the corresponding correction file according to the actual scene dynamic level, and obtaining the target pixel position and the corresponding correction parameters stored in the correction file.

在本实施例的一些实施方式中,确定模块还用于:根据场景动态等级相应确定整体像素阵列中的感兴趣阵列区域。该图像生成装置还包括:另外,该图像生成装置还包括选取模块,用于从感兴趣阵列区域中选取对应于待校正像素数量的目标像素位置。In some implementations of this embodiment, the determining module is further configured to: correspondingly determine the array region of interest in the overall pixel array according to the dynamic level of the scene. The image generating device further includes: In addition, the image generating device further includes a selecting module, configured to select target pixel positions corresponding to the number of pixels to be corrected from the array area of interest.

应当说明的是,前述实施例中的图像生成方法均可基于本实施例提供的图像生成装置实现,所属领域的普通技术人员可以清楚的了解到,为描述的方便和简洁,本实施例中所描述的图像生成装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It should be noted that the image generation methods in the foregoing embodiments can all be implemented based on the image generation device provided in this embodiment, and those of ordinary skill in the art can clearly understand that for the convenience and simplicity of description, the For the specific working process of the described image generating device, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.

图5为本申请一实施例提供的一种图像传感器,该图像传感器可用于实现前述实施例中的图像生成方法,主要包括:Fig. 5 is an image sensor provided by an embodiment of the present application, the image sensor can be used to implement the image generation method in the foregoing embodiment, mainly including:

存储器501、处理器502及存储在存储器501上并可在处理器502上运行的计算机程序503,存储器501和处理器502通过通信连接。处理器502执行该计算机程序503时,实现前述实施例中的方法。其中,处理器的数量可以是一个或多个。A memory 501, a processor 502, and a computer program 503 stored in the memory 501 and operable on the processor 502. The memory 501 and the processor 502 are connected through communication. When the processor 502 executes the computer program 503, the methods in the foregoing embodiments are implemented. Wherein, the number of processors may be one or more.

存储器501可以是高速随机存取记忆体(RAM,Random Access Memory)存储器,也可为非不稳定的存储器(non-volatile memory),例如磁盘存储器。存储器501用于存储可执行程序代码,处理器502与存储器501耦合。The memory 501 can be a high-speed random access memory (RAM, Random Access Memory) memory, or a non-volatile memory (non-volatile memory), such as a disk memory. The memory 501 is used to store executable program codes, and the processor 502 is coupled to the memory 501 .

进一步的,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是设置于上述实施例中的图像传感器中,该计算机可读存储介质可以是前述图5所示实施例中的存储器。Further, the embodiment of the present application also provides a computer-readable storage medium, which can be set in the image sensor in the above-mentioned embodiment, and the computer-readable storage medium can be the Examples of memory.

该计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现前述实施例中的图像生成方法。进一步的,该计算机可存储介质还可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A computer program is stored on the computer-readable storage medium, and when the program is executed by a processor, the image generation method in the foregoing embodiments is realized. Further, the computer storage medium can also be various media that can store program codes such as U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), RAM, magnetic disk or optical disk.

还应当说明的是,在本申请所提供的几个实施例中所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。It should also be noted that the devices and methods disclosed in the several embodiments provided in this application may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.

作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。A module described as a separate component may or may not be physically separated, and a component shown as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.

集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a readable memory The medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The above-mentioned readable storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Depending on the application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

以上为对本申请所提供的图像生成方法、装置、图像传感器及存储介质的描述,对于本领域的技术人员,依据本申请实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。The above is the description of the image generation method, device, image sensor and storage medium provided by this application. For those skilled in the art, according to the idea of the embodiment of this application, there will be changes in the specific implementation and application scope. In summary, the contents of this specification should not be construed as limiting the application.

Claims (10)

1.一种图像生成方法,其特征在于,包括:1. An image generation method, characterized in that, comprising: 当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数;其中,所述原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;After the image sensor generates the original image file at the actual working moment, call the target pixel position and the corresponding correction parameters stored in the preset correction file; wherein, the original image file includes the corresponding original number of each pixel position in the overall pixel array Image signal value; 根据所述校正参数对所述目标像素位置相应的所述原始数字图像信号值进行校正,得到校正后数字图像信号值;Correcting the original digital image signal value corresponding to the target pixel position according to the correction parameter to obtain a corrected digital image signal value; 基于所述校正后数字图像信号值计算所述目标像素位置的有效数字图像信号值,以及基于所述原始数字图像信号值计算除所述目标像素位置之外的其它像素位置的所述有效数字图像信号值;calculating an effective digital image signal value at the target pixel position based on the corrected digital image signal value, and calculating the effective digital image at other pixel positions other than the target pixel position based on the original digital image signal value signal value; 结合所有所述像素位置的所述有效数字图像信号值生成目标输出图像。A target output image is generated by combining said effective digital image signal values at all said pixel locations. 2.根据权利要求1所述的图像生成方法,其特征在于,所述调用预设校正文件中所存储的目标像素位置以及相应的校正参数的步骤之前,还包括:2. The image generation method according to claim 1, wherein before the step of calling the stored target pixel position and the corresponding correction parameters in the preset correction file, further comprising: 获取处于暗场条件的所述图像传感器在测试工作时刻生成的原始图像文件;Obtain the original image file generated by the image sensor in the dark field condition during the test operation; 基于所述原始图像文件中所述原始数字图像信号值计算关联于暗电流的平均噪声数字图像信号值;calculating an average noise digital image signal value associated with dark current based on the raw digital image signal values in the raw image file; 根据所述平均噪声数字图像信号值生成所述校正文件。The correction file is generated according to the average noise digital image signal value. 3.根据权利要求2所述的图像生成方法,其特征在于,所述根据所述平均噪声数字图像信号值生成所述校正文件的步骤,包括:3. The image generation method according to claim 2, wherein the step of generating the correction file according to the average noise digital image signal value comprises: 获取所述平均噪声数字图像信号值的小数部分数值,以及获取所述整体像素阵列的总像素数量;obtaining the value of the fractional part of the average noise digital image signal value, and obtaining the total number of pixels of the overall pixel array; 基于所述小数部分数值以及所述总像素数量生成所述校正文件。The correction file is generated based on the fractional part value and the total pixel quantity. 4.根据权利要求3所述的图像生成方法,其特征在于,所述基于所述小数部分数值以及所述总像素数量生成所述校正文件的步骤,包括:4. The image generation method according to claim 3, wherein the step of generating the correction file based on the fractional value and the total number of pixels comprises: 将所述小数部分数值以及所述总像素数量输入至预设指标计算公式,计算待校正像素数量以及校正参数;所述指标计算公式表示为:Input the value of the fractional part and the total number of pixels into the preset index calculation formula to calculate the number of pixels to be corrected and the correction parameters; the index calculation formula is expressed as: a*b=C(m*n),a*b=C(m*n), C*n=1;C*n=1; 其中,a表示所述小数部分数值,b表示所述总像素数量,C表示已知常数,m表示所述待校正像素数量,n表示所述校正参数且取值为负值;Wherein, a represents the value of the fractional part, b represents the total number of pixels, C represents a known constant, m represents the number of pixels to be corrected, n represents the correction parameter and its value is a negative value; 基于所述校正参数以及从所述整体像素阵列中选取的对应于所述待校正像素数量的目标像素位置,生成所述校正文件。The correction file is generated based on the correction parameters and target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected. 5.根据权利要求3所述的图像生成方法,其特征在于,所述基于所述校正后数字图像信号值计算所述目标像素位置的有效数字图像信号值,以及基于所述原始数字图像信号值计算除所述目标像素位置之外的其它像素位置的所述有效数字图像信号值的步骤,包括:5. The image generating method according to claim 3, wherein the calculating the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculating the effective digital image signal value based on the original digital image signal value The step of calculating the effective digital image signal values of other pixel positions except the target pixel position includes: 计算所述校正后数字图像信号值与所述平均噪声数字图像信号值的整数部分数值的差值,得到所述目标像素位置的有效数字图像信号值,以及计算除所述目标像素位置之外的其它像素位置的所述原始数字图像信号值与所述整数部分数值的差值,得到所述其它像素位置的所述有效数字图像信号值。calculating the difference between the corrected digital image signal value and the value of the integer part of the average noise digital image signal value to obtain an effective digital image signal value at the target pixel position, and calculating a value other than the target pixel position The difference between the original digital image signal value of other pixel positions and the value of the integer part is used to obtain the effective digital image signal value of the other pixel positions. 6.根据权利要求4所述的图像生成方法,其特征在于,所述将所述小数部分数值以及所述总像素数量输入至预设指标计算公式,计算待校正像素数量以及校正参数的步骤之前,还包括:6. The image generation method according to claim 4, characterized in that, before the step of calculating the number of pixels to be corrected and the correction parameters, the number of the fractional part and the total number of pixels are input into a preset index calculation formula ,Also includes: 分别根据不同场景动态等级确定相应的所述已知常数;Determining the corresponding known constants according to different scene dynamic levels respectively; 所述基于所述校正参数以及从所述整体像素阵列中选取的对应于所述待校正像素数量的目标像素位置,生成所述校正文件的步骤,包括:The step of generating the correction file based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected includes: 针对各所述场景动态等级,基于所述校正参数以及从所述整体像素阵列中选取的对应于所述待校正像素数量的目标像素位置,生成相应的所述校正文件;For each scene dynamic level, based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected, the corresponding correction file is generated; 所述调用预设校正文件中所存储的目标像素位置以及相应的校正参数的步骤,包括:The step of calling the target pixel position and the corresponding correction parameters stored in the preset correction file includes: 根据实际场景动态等级调用相应的校正文件,并获取所述校正文件中所存储的目标像素位置以及相应的校正参数。The corresponding correction file is invoked according to the actual scene dynamic level, and the target pixel position and corresponding correction parameters stored in the correction file are obtained. 7.根据权利要求6所述的图像生成方法,其特征在于,所述基于所述校正参数以及从所述整体像素阵列中选取的对应于所述待校正像素数量的目标像素位置,生成相应的所述校正文件的步骤之前,还包括:7. The image generation method according to claim 6, characterized in that, based on the correction parameters and the target pixel positions selected from the overall pixel array corresponding to the number of pixels to be corrected, the corresponding Before the step of correcting the file, it also includes: 根据所述场景动态等级相应确定所述整体像素阵列中的感兴趣阵列区域;Correspondingly determining an array area of interest in the overall pixel array according to the scene dynamic level; 从所述感兴趣阵列区域中选取对应于所述待校正像素数量的所述目标像素位置。The target pixel positions corresponding to the number of pixels to be corrected are selected from the array region of interest. 8.一种图像生成装置,其特征在于,包括:8. An image generating device, characterized in that, comprising: 调用模块,用于当图像传感器在实际工作时刻生成原始图像文件之后,调用预设校正文件中所存储的目标像素位置以及相应的校正参数;其中,所述原始图像文件包括整体像素阵列中各像素位置相应的原始数字图像信号值;The calling module is used to call the target pixel position and the corresponding correction parameters stored in the preset correction file after the image sensor generates the original image file at the actual working moment; wherein, the original image file includes each pixel in the overall pixel array The original digital image signal value corresponding to the position; 校正模块,用于根据所述校正参数对所述目标像素位置相应的所述原始数字图像信号值进行校正,得到校正后数字图像信号值;A correction module, configured to correct the original digital image signal value corresponding to the target pixel position according to the correction parameter, to obtain a corrected digital image signal value; 计算模块,用于基于所述校正后数字图像信号值计算所述目标像素位置的有效数字图像信号值,以及基于所述原始数字图像信号值计算除所述目标像素位置之外的其它像素位置的所述有效数字图像信号值;A calculation module, configured to calculate the effective digital image signal value of the target pixel position based on the corrected digital image signal value, and calculate the effective digital image signal value of other pixel positions except the target pixel position based on the original digital image signal value the effective digital image signal value; 生成模块,用于结合所有所述像素位置的所述有效数字图像信号值生成目标输出图像。A generating module, configured to combine the effective digital image signal values of all the pixel positions to generate a target output image. 9.一种图像传感器,其特征在于,包括存储器及处理器,其中:9. An image sensor, characterized in that it includes a memory and a processor, wherein: 所述处理器用于执行存储在所述存储器上的计算机程序;said processor is operable to execute a computer program stored on said memory; 所述处理器执行所述计算机程序时,实现权利要求1至7中任意一项所述图像生成方法中的步骤。When the processor executes the computer program, the steps in the image generating method according to any one of claims 1 to 7 are realized. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现权利要求1至7中的任意一项所述图像生成方法中的步骤。10. A computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps in the image generation method according to any one of claims 1 to 7 are realized .
CN202211729410.0A 2022-12-30 2022-12-30 Image generation method, device, image sensor and storage medium Active CN116055902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211729410.0A CN116055902B (en) 2022-12-30 2022-12-30 Image generation method, device, image sensor and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211729410.0A CN116055902B (en) 2022-12-30 2022-12-30 Image generation method, device, image sensor and storage medium

Publications (2)

Publication Number Publication Date
CN116055902A true CN116055902A (en) 2023-05-02
CN116055902B CN116055902B (en) 2024-11-22

Family

ID=86128861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211729410.0A Active CN116055902B (en) 2022-12-30 2022-12-30 Image generation method, device, image sensor and storage medium

Country Status (1)

Country Link
CN (1) CN116055902B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001076133A (en) * 1999-09-06 2001-03-23 I4 Corp Method and device for reducing noise of image data
US20040080636A1 (en) * 1998-05-20 2004-04-29 Kimble Dong On-chip dead pixel correction in a CMOS imaging sensor
US20110128419A1 (en) * 2009-11-30 2011-06-02 Stmicroelectronics (Research & Development) Limited Method and system for x-droop correction in solid state image sensor
EP2645708A2 (en) * 2012-03-30 2013-10-02 FUJIFILM Corporation Stripe noise correction method of captured image, photographing apparatus and electronic endoscopic apparatus
CN104243770A (en) * 2013-06-19 2014-12-24 日立产业控制解决方案有限公司 Image signal processing apparatus, imaging apparatus and image processing program
US20150071564A1 (en) * 2012-06-19 2015-03-12 Olympus Corporation Image processing device, endoscope apparatus, isolated point noise correction method, and information storage device
CN104680489A (en) * 2015-02-11 2015-06-03 深圳怡化电脑股份有限公司 Image correcting method and system
WO2016113936A1 (en) * 2015-01-16 2016-07-21 ローム株式会社 Image correction device, imaging device, and correction table creation method
WO2018092715A1 (en) * 2016-11-17 2018-05-24 株式会社ソニー・インタラクティブエンタテインメント Image processing device, image processing method and program
CN111325691A (en) * 2020-02-20 2020-06-23 Oppo广东移动通信有限公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN111432093A (en) * 2020-03-19 2020-07-17 成都微光集电科技有限公司 Dark current correction method of CMOS image sensor
CN113469890A (en) * 2020-03-31 2021-10-01 比亚迪半导体股份有限公司 Image denoising method, device, equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040080636A1 (en) * 1998-05-20 2004-04-29 Kimble Dong On-chip dead pixel correction in a CMOS imaging sensor
JP2001076133A (en) * 1999-09-06 2001-03-23 I4 Corp Method and device for reducing noise of image data
US20110128419A1 (en) * 2009-11-30 2011-06-02 Stmicroelectronics (Research & Development) Limited Method and system for x-droop correction in solid state image sensor
EP2645708A2 (en) * 2012-03-30 2013-10-02 FUJIFILM Corporation Stripe noise correction method of captured image, photographing apparatus and electronic endoscopic apparatus
US20150071564A1 (en) * 2012-06-19 2015-03-12 Olympus Corporation Image processing device, endoscope apparatus, isolated point noise correction method, and information storage device
CN104243770A (en) * 2013-06-19 2014-12-24 日立产业控制解决方案有限公司 Image signal processing apparatus, imaging apparatus and image processing program
WO2016113936A1 (en) * 2015-01-16 2016-07-21 ローム株式会社 Image correction device, imaging device, and correction table creation method
CN104680489A (en) * 2015-02-11 2015-06-03 深圳怡化电脑股份有限公司 Image correcting method and system
WO2018092715A1 (en) * 2016-11-17 2018-05-24 株式会社ソニー・インタラクティブエンタテインメント Image processing device, image processing method and program
CN111325691A (en) * 2020-02-20 2020-06-23 Oppo广东移动通信有限公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN111432093A (en) * 2020-03-19 2020-07-17 成都微光集电科技有限公司 Dark current correction method of CMOS image sensor
CN113469890A (en) * 2020-03-31 2021-10-01 比亚迪半导体股份有限公司 Image denoising method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116055902B (en) 2024-11-22

Similar Documents

Publication Publication Date Title
CN111753869B (en) Image processing method, image processing device, storage medium, image processing system and learned model manufacturing method
WO2019105154A1 (en) Image processing method, apparatus and device
JP5832855B2 (en) Image processing apparatus, imaging apparatus, and image processing program
CN108683861A (en) Shooting exposure control method and device, imaging device and electronic device
JP2009212853A (en) White balance controller, its control method, and imaging apparatus
JP6270413B2 (en) Image processing apparatus, imaging apparatus, and image processing method
CN106604001B (en) Image processing method, image processing device, imaging device and electronic device
JP6083974B2 (en) Image processing apparatus, image processing method, and program
CN104869380A (en) Image processing apparatus and image processing method
JP5782311B2 (en) Imaging apparatus and control method thereof
JP2014086956A (en) Image processing apparatus and image processing method
CN109005363A (en) Imaging control method, imaging control device, electronic device and storage medium
CN110677558A (en) Image processing method and electronic device
CN108198189A (en) Picture definition obtaining method and device, storage medium and electronic equipment
JP7699964B2 (en) Imaging device, control method thereof, program, and storage medium
CN110930440A (en) Image alignment method, device, storage medium and electronic device
JP2018185586A (en) Image processing device and image processing method, and imaging device
CN112995633B (en) Image white balance processing method and device, electronic equipment and storage medium
CN116055902A (en) Image generation method and device, image sensor and storage medium
KR101612853B1 (en) Photographing apparatus, controlling method of photographing apparatus, and recording medium storing program to implement the controlling method
CN116055891A (en) Image processing method and device
TWI768282B (en) Method and system for establishing light source information prediction model
CN109447925B (en) Image processing method and device, storage medium, electronic device
JP2007288245A (en) Imaging apparatus, image processing method, and image processing program
TW202127857A (en) White balance adjustment method, image processing device and image processing system

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