WO2020258287A1 - 图像校正方法和图像校正装置以及电子设备 - Google Patents

图像校正方法和图像校正装置以及电子设备 Download PDF

Info

Publication number
WO2020258287A1
WO2020258287A1 PCT/CN2019/093840 CN2019093840W WO2020258287A1 WO 2020258287 A1 WO2020258287 A1 WO 2020258287A1 CN 2019093840 W CN2019093840 W CN 2019093840W WO 2020258287 A1 WO2020258287 A1 WO 2020258287A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
compressed
memory
compression algorithm
compressed file
Prior art date
Application number
PCT/CN2019/093840
Other languages
English (en)
French (fr)
Inventor
麻军平
陈星�
张强
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980011443.1A priority Critical patent/CN111713099A/zh
Priority to PCT/CN2019/093840 priority patent/WO2020258287A1/zh
Publication of WO2020258287A1 publication Critical patent/WO2020258287A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/68Noise processing, e.g. detecting, correcting, reducing or removing noise applied to defects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular to image correction methods, image correction devices and electronic equipment.
  • the current way of collecting images is mainly to obtain an image by generating an electrical signal based on a light signal by a photosensitive element array in the image sensor.
  • some photosensitive elements in the photosensitive element array have problems and cannot accurately generate electrical signals based on optical signals.
  • Such photosensitive elements are called dead pixels.
  • dead pixels it is necessary to first determine the location of the dead pixels to generate a record file, and then correct the image generated by the image sensor based on the record file in the subsequent process.
  • the record file it needs to be stored in the memory first, so that it can be read when the image is corrected later.
  • the data volume of the recorded file is positively correlated with the resolution of the image. As the current image resolution is getting higher and higher, the data volume of the recorded file is getting larger and larger, which will increase the burden on the memory and lead to reading the record The file speed is reduced.
  • the present disclosure provides an image correction method, an image correction device, and an electronic device, so as to reduce the data amount of a file stored in a memory during an image correction process, and improve the reading speed.
  • an image correction method is proposed, which is applicable to an electronic device, the electronic device includes a memory, and the method includes:
  • Reading a compressed file from the memory where the compressed file is a recording file compressed by a compression algorithm, and the recording file is used to record bad pixels in the image sensor;
  • an image correction device which includes a memory and also includes one or more processors working individually or cooperatively, and the processors are configured to:
  • Reading a compressed file from the memory where the compressed file is a recording file compressed by a compression algorithm, and the recording file is used to record bad pixels in the image sensor;
  • an electronic device including:
  • a memory for storing processor executable instructions
  • the processor is configured to implement the image correction method described in any of the foregoing embodiments.
  • the recording file can be compressed at a larger compression rate to achieve a larger compression ratio, so that the compressed file after compression can greatly reduce the data volume of the recorded file before compression.
  • the compressed file is stored in the memory, and a large amount of storage space can be saved by storing the record file directly.
  • the speed of reading compressed files from the storage space can be improved relative to the speed of reading recorded files, so that the compressed files can be read quickly, and subsequent operations such as image correction and display can be completed.
  • Fig. 1 is a schematic flowchart showing an image correction method according to an embodiment of the present disclosure.
  • Fig. 2 is a schematic diagram showing an image sensor according to an embodiment of the present disclosure.
  • Fig. 3 is a schematic diagram showing a dead pixel according to an embodiment of the present disclosure.
  • Fig. 4 is a schematic flowchart showing another image correction method according to an embodiment of the present disclosure.
  • Fig. 5 is a schematic flowchart of generating a compressed file according to an embodiment of the present disclosure.
  • Fig. 6 is a schematic flowchart showing yet another image correction method according to an embodiment of the present disclosure.
  • Fig. 7 is a schematic flowchart showing yet another image correction method according to an embodiment of the present disclosure.
  • Fig. 8 is a schematic diagram showing a corrected image according to an embodiment of the present disclosure.
  • Fig. 9 is a schematic diagram showing a hardware structure of a server where an image correction device is located according to an embodiment of the present disclosure.
  • Fig. 1 is a schematic flowchart showing an image correction method according to an embodiment of the present disclosure.
  • the image correction method shown in this embodiment can be applied to electronic devices that include memory, for example, it can be applied to electronic devices that have an image capture function, such as a mobile phone equipped with a camera, and can also be applied to electronic devices that do not have an image capture function.
  • the server can receive and store compressed files and images from the device that collects images.
  • the device to which the image correction method is applicable can be selected according to needs, and this embodiment does not limit it.
  • the following embodiments mainly exemplify the technical solution of the present disclosure when the image correction method is applicable to an electronic device with an image acquisition function.
  • the image correction method may include the following steps:
  • Step S1 reading a compressed file from the memory, where the compressed file is a recording file compressed by a compression algorithm, and the recording file is used to record bad pixels in the image sensor;
  • the electronic device may predetermine the dead pixels in the image sensor.
  • the image sensor includes an array of photosensitive elements.
  • the photosensitive elements may be CMOS (Complementary Metal Oxide Semiconductor) sensors.
  • the dead pixels are the image sensor. In the photosensitive element that cannot accurately generate electrical signals based on optical signals, it then generates record files based on the dead pixels in the image sensor.
  • Fig. 2 is a schematic diagram showing an image sensor according to an embodiment of the present disclosure.
  • Fig. 3 is a schematic diagram showing a dead pixel according to an embodiment of the present disclosure.
  • the image sensor may include a plurality of photosensitive elements, the plurality of photosensitive elements may be distributed in an array, and each photosensitive element may be provided with a corresponding identification.
  • the photosensitive element identified as p12 in the second row and third column and the photosensitive element identified as p43 in the fifth row and fourth column cannot accurately generate electrical signals according to the light signal, then these two photosensitive elements can be called dead pixels in the image sensor , According to the bad pixels in the image sensor, the record file shown in Figure 3 can be generated.
  • the recording file may be a bitmap file.
  • a normal point a photosensitive element that accurately generates an electrical signal according to an optical signal
  • a normal point identifier can be set, such as Set to 0, for the location of the dead pixels, you can set the dead pixel identifier, for example, set it to 1, so that the dead pixels in the image sensor can be recorded through the recording file.
  • the recording file may be compressed by a compression algorithm, such as a Huffman coding algorithm, to obtain a compressed file, and then the compressed file may be stored in a memory, for example, may be stored in a non-volatile memory.
  • a compression algorithm such as a Huffman coding algorithm
  • the compressed file can be read from the memory.
  • the read compressed file may be loaded into the memory first, and the memory may be a static random access memory or a dynamic random access memory for quick acquisition in subsequent use.
  • Step S2 decompress the compressed file by a decompression algorithm corresponding to the compression algorithm to obtain the record file;
  • the compressed file can be decompressed by a decompression algorithm corresponding to the compression algorithm.
  • the compression algorithm is the Huffman coding algorithm
  • the compressed file can be decompressed by the decompression algorithm corresponding to the Huffman coding algorithm.
  • Unzip is the Huffman coding algorithm
  • Step S3 Correct the image generated according to the image sensor according to the record file.
  • the algorithms used for correction include but are not limited to ISP (Image Signal Processing, image signal processing) algorithms.
  • the image generated by the image sensor can be corrected according to the decompressed record file. For example, according to the record file, it can be determined that the photosensitive element in the second row and third column of the image sensor shown in FIG. The photosensitive element identified as p43 in the fourth column of the five rows is a dead pixel. The pixel values of the two dead pixels at corresponding positions in the image can be determined based on the weighted summation of the pixel values of other surrounding locations.
  • the recording file can be compressed at a larger compression rate to achieve a larger compression ratio, so that the compressed file after compression can greatly reduce the data volume of the recorded file before compression.
  • the compressed file is stored in the memory, and a large amount of storage space can be saved by storing the record file directly.
  • the speed of reading compressed files from the storage space can be improved relative to the speed of reading recorded files, so that the compressed files can be read quickly, and subsequent operations such as image correction and display can be completed.
  • Fig. 4 is a schematic flowchart showing another image correction method according to an embodiment of the present disclosure. As shown in FIG. 4, the reading the compressed file from the storage includes:
  • Step S11 reading the compressed file from a non-volatile memory
  • Step S12 Load the compressed file into the memory.
  • the memory for storing the compressed file may be a non-volatile memory (such as flash). Since the non-volatile memory is powered off, the stored data will not be lost, so that the compressed file can be stored well. Then load the read compressed file into the memory. Because the storage and reading speed are fast, it is convenient to read the compressed file from the memory for decompression when the compressed file is subsequently decompressed.
  • non-volatile memory such as flash
  • the memory includes static random access memory and/or dynamic random access memory.
  • a static random access memory (Static Random-Access Memory, SRAM for short) can be used as the memory
  • a dynamic random access memory DRAM for short
  • SRAM Static Random-Access Memory
  • DRAM Dynamic Random Access Memory
  • DRAM has a relatively simple structure and occupies a small space in electronic equipment. Therefore, storing compressed files in DRAM based on this embodiment can mainly reduce the occupation of DRAM memory bandwidth.
  • the structure of SRAM is relatively complex. The medium occupies a relatively large space, so based on this embodiment, storing compressed files through SRAM can mainly reduce the space occupation of the electronic device by SRAM.
  • the recording file includes a bitmap file.
  • the bitmap file bitmap can be used as the recording file. Since the bitmap file can store data in the form of an array as shown in Figure 3, the dead and normal points in the image sensor are also distributed according to the array. It is convenient to record the dead pixels in the image sensor composed of the photosensitive element array.
  • the resolution of the bitmap file is the same as the resolution of the image sensor.
  • the resolution of the bitmap file can be set to be the same as the resolution of the image sensor, so that the bitmap file can completely store the bad dot identifiers of the dead pixels and the normal dot identifiers of the normal points in the image sensor. There will be positions where the logo is not stored, thereby reducing the storage space occupied by the unstored data in the bitmap file.
  • the photosensitive element in the image sensor is a complementary metal oxide semiconductor (that is, CMOS) sensor.
  • CMOS complementary metal oxide semiconductor
  • sensors of other materials can also be selected as photosensitive elements as required.
  • the compression algorithm is a lossless compression algorithm.
  • the compression algorithm is a lossless compression algorithm
  • compressing the recording file does not cause the data in the recording file to be lost.
  • the recording file to be decompressed is the same as the recording file before compression, based on the recording obtained by decompression.
  • the file can accurately determine the dead pixels in the image sensor.
  • the lossless compression algorithm includes at least one of the following:
  • Huffman coding Huffman coding, arithmetic coding, run-length coding.
  • Fig. 5 is a schematic flowchart of generating a compressed file according to an embodiment of the present disclosure. As shown in Figure 5, the compressed file is generated in the following manner:
  • Step S1' determining the ratio of the bad points in the recording file to all the points in the recording file
  • Step S2' if the ratio is less than a preset value, compress the record file by a compression algorithm to generate a compressed file.
  • the recording file there are more dead pixels in the image sensor, that is, there are more dead pixels in the recording file.
  • there are fewer normal points in the recording file so normal There are fewer point identifiers, so there are fewer cases where normal point identifiers continuously repeat. In this case, the recording file is compressed, and the compression rate is slower.
  • the recording file can be compressed by a compression algorithm to generate a compressed file to achieve a larger compression rate and a larger compression ratio.
  • the ratio is greater than or equal to the preset value, it can be determined that there are more dead pixels and fewer normal points, so you can directly store the recording file in the memory to avoid wasting too much time in the compression process.
  • Fig. 6 is a schematic flowchart showing yet another image correction method according to an embodiment of the present disclosure.
  • the decompression algorithm corresponding to the lossless compression algorithm includes:
  • Step S31 decompress the compressed file through an ASIC (Application Specific Integrated Circuit) chip
  • the ASIC chip integrates functional modules corresponding to the decompression algorithm in the design phase.
  • the compressed file can be decompressed through the ASCI chip. Since the ASIC chip is not programmable, it is necessary to integrate the functional module corresponding to the decompression algorithm in the design stage so that the decompression and compression can be realized by the decompression algorithm after leaving the factory. file.
  • Fig. 7 is a schematic flowchart showing yet another image correction method according to an embodiment of the present disclosure.
  • the decompression algorithm corresponding to the lossless compression algorithm includes:
  • Step S32 decompress the compressed file through FPGA (Field-Programmable Gate Array, programmable logic gate array);
  • the FPGA adds support for the decompression algorithm in the development stage.
  • the compressed file can be decompressed through FPGA. Because FPGA is programmable, support for decompression algorithms can be added in the development stage, so that users can configure the functions of FPGA as needed so that FPGA can pass all The described decompression algorithm decompresses the compressed file.
  • Fig. 8 is a schematic diagram showing a corrected image according to an embodiment of the present disclosure.
  • the image correction function can be realized by an ASIC chip or FPGA, which can include a memory, a decompression module, and a correction module.
  • a compressed file is stored in the memory. After the compressed file is read from the memory, it can be input to the decompression module.
  • the decompression module can decompress the compressed file through the decompression algorithm corresponding to the compression algorithm used, and then decompress the obtained
  • the record file of is input to the correction module, and the correction module corrects the image data before correction according to the bad spots in the record file to obtain the corrected image data.
  • the present disclosure also proposes an embodiment of the image correction device.
  • the embodiments of the image correction device of the present disclosure can be applied on a server.
  • the device embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the server where it is located. From a hardware perspective, as shown in Figure 9, it is a hardware structure diagram of the server where the image correction device of the present disclosure is located.
  • the server where the device is located can usually also include other hardware, such as a forwarding chip responsible for processing messages, etc.; in terms of hardware structure, the server may also be a distributed device, which may include multiple interface cards, so that it can be used at the hardware level. Carry out the expansion of message processing.
  • An embodiment of the present disclosure also provides an image correction device, including a memory, and one or more processors working individually or in cooperation, and the processors are configured to:
  • Reading a compressed file from the memory where the compressed file is a recording file compressed by a compression algorithm, and the recording file is used to record bad pixels in the image sensor;
  • the processor is used to:
  • the memory includes static random access memory and/or dynamic random access memory.
  • the recording file includes a bitmap file.
  • the resolution of the bitmap file is the same as the resolution of the image sensor.
  • the photosensitive element in the image sensor is a complementary metal oxide semiconductor sensor.
  • the compression algorithm is a lossless compression algorithm.
  • the lossless compression algorithm includes at least one of the following:
  • Huffman coding Huffman coding, arithmetic coding, run-length coding.
  • the processor is further configured to:
  • the processor is used to:
  • the ASIC chip integrates functional modules corresponding to the decompression algorithm in the design phase.
  • the processor is used to:
  • the FPGA adds support for the decompression algorithm in the development stage.
  • the embodiment of the present disclosure also proposes an electronic device, including:
  • a memory for storing processor executable instructions
  • the processor is configured to implement the image correction method described in any of the foregoing embodiments.
  • the systems, devices, modules, or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or implemented by products with certain functions.
  • the functions are divided into various units and described separately.
  • the functions of each unit can be implemented in the same one or more software and/or hardware.
  • the embodiments of the present disclosure can be provided as methods, systems, or computer program products. Therefore, the present disclosure may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware.
  • the present disclosure may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

一种图像校正方法,包括:从存储器中读取压缩文件,其中,压缩文件为通过压缩算法压缩的记录文件,记录文件用于记录图像传感器中的坏点(S1);通过与压缩算法对应的解压算法,对压缩文件进行解压缩,以得到记录文件(S2);根据记录文件对根据图像传感器生成的图像进行校正(S3)。由于图像传感器中一般坏点数量较少,正常点数量较多,所以记录文件中正常点标识较多,并且是连续的,坏点标识较少。在压缩时,对于记录文件可以以较大的压缩速率,实现较大压缩比的压缩,极大地降低了数据量。

Description

图像校正方法和图像校正装置以及电子设备 技术领域
本公开涉及图像处理技术领域,尤其涉及图像校正方法,图像校正装置和电子设备。
背景技术
目前采集图像的方式,主要是通过图像传感器感中的感光元件阵列根据光信号生成电信号来得到图像。
但是由于工艺的限制,感光元件阵列中的部分感光元件存在问题,不能准确地根据光信号生成电信号,这种感光元件称作坏点。对于坏点,需要先确定坏点的位置生成记录文件,然后在后续过程中基于记录文件对图像传感器感生成的图像进行校正。
对于记录文件,需要先存储在存储器中,以备后续校正图像时读取。但是记录文件的数据量与图像的分辨率是正相关的,随着目前图像分辨率越来越高,记录文件的数据量也越来越大,这会导致存储器的负担加重,而且导致读取记录文件的速度降低。
发明内容
本公开提供图像校正方法,图像校正装置和电子设备,以降低图像校正过程中,存储器存储文件的数据量,提高读取速度。
根据本公开实施例的第一方面,提出一种图像校正方法,适用于电子设备,所述电子设备包括存储器,所述方法包括:
从所述存储器中读取压缩文件,其中,所述压缩文件为通过压缩算法压缩的记录文件,所述记录文件用于记录图像传感器中的坏点;
通过与所述压缩算法对应的解压算法,对所述压缩文件进行解压缩,以 得到所述记录文件;
根据所述记录文件对根据所述图像传感器生成的图像进行校正。
根据本公开实施例的第二方面,提出一种图像校正装置,包括存储器,还包括单独或者协同工作的一个或者多个处理器,所述处理器用于:
从所述存储器中读取压缩文件,其中,所述压缩文件为通过压缩算法压缩的记录文件,所述记录文件用于记录图像传感器中的坏点;
通过与所述压缩算法对应的解压算法,对所述压缩文件进行解压缩,以得到所述记录文件;
根据所述记录文件对根据所述图像传感器生成的图像进行校正。
根据本公开实施例的第三方面,提出一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为实现上述任一实施例所述的图像校正方法。
根据本公开的实施例,由于图像传感器中一般坏点数量较少,正常点数量较多,所以记录文件中正常点标识较多,并且是连续的,而坏点标识较少。那么在压缩时,对于记录文件可以以较大的压缩速率,实现较大压缩比的压缩,使得压缩后的压缩文件相对压缩前的记录文件极大地降低数据量。
进而通过存储器存储压缩文件,相对直接存储记录文件,可以节约大量的存储空间。并且从存储空间中读取压缩文件,相对读取记录文件的速度也可以得到提高,从而可以快速读取压缩文件,并完成对图像的校正和显示等后续操作。
附图说明
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是根据本公开的实施例示出的一种图像校正方法的示意流程图。
图2是根据本公开的实施例示出的一种图像传感器的示意图。
图3是根据本公开的实施例示出的一种坏点的示意图。
图4是根据本公开的实施例示出的另一种图像校正方法的示意流程图。
图5是根据本公开的实施例示出的一种生成压缩文件的示意流程图。
图6是根据本公开的实施例示出的又一种图像校正方法的示意流程图。
图7是根据本公开的实施例示出的又一种图像校正方法的示意流程图。
图8是根据本公开的实施例示出的一种校正图像的示意图。
图9是根据本公开的实施例示出图像校正装置所在服务器的一种硬件结构示意图。
具体实施方式
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
图1是根据本公开的实施例示出的一种图像校正方法的示意流程图。
本实施例所示的图像校正方法可以适用于包括存储器的电子设备,例如可以适用于具备图像采集功能的电子设备,例如设置有相机的手机,也可以适用于不具备图像采集功能的电子设备,例如服务器,服务器可以从采集图像的设备处接收压缩文件和图像并存储。而图像校正方法所适用的设备,可以根据需要选择,本实施例不做限制。
以下实施例主要在图像校正方法适用于具备图像采集功能的电子设备的情况下,对本公开的技术方案进行示例性说明。
如图1所述,所述图像校正方法可以包括以下步骤:
步骤S1,从所述存储器中读取压缩文件,其中,所述压缩文件为通过压 缩算法压缩的记录文件,所述记录文件用于记录图像传感器中的坏点;
在一个实施例中,电子设备可以预先确定图像传感器中的坏点,例如图像传感器包含感光元件阵列,感光元件可以为CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物半导体)传感器,坏点即图像传感器中不能准确地根据光信号生成电信号的感光元件,然后根据在图像传感器中的坏点生成记录文件。
图2是根据本公开的实施例示出的一种图像传感器的示意图。图3是根据本公开的实施例示出的一种坏点的示意图。
如图2所示,图像传感器可以包括多个感光元件,多个感光元件可以成阵列分布,每个感光元件可以设置有相应的标识。例如第二行第三列标识为p12的感光元件和第五行第四列标识为p43的感光元件不能准确地根据光信号生成电信号,那么这两个感光元件可以称作图像传感器中的坏点,根据图像传感器中的坏点可以生成如图3所示的记录文件。
如图3所示,所述记录文件可以是位图(bitmap)文件,在记录文件中,对于正常点(准确地根据光信号生成电信号的感光元件)的位置,可以设置正常点标识,例如设置为0,对于坏点的位置,可以设置坏点标识,例如设置为1,从而通过记录文件,可以记录图像传感器中的坏点。
进而可以通过压缩算法,例如霍夫曼(huffman)编码算法对记录文件进行压缩得到压缩文件,然后将压缩文件存储在存储器中,例如可以存储在非易失存储器中。
进而在需要时,例如在启动所述电子设备时,或者在需要显示图像时,或者在接收到特定指令时,可以从所述存储器中读取压缩文件。
在一个实施例中,对于读取到的压缩文件,可以先加载到内存中,所述内存可以是静态随机存取存储器,也可以是动态随机存取存储器,以备后续使用时快速获取。
步骤S2,通过与所述压缩算法对应的解压算法,对所述压缩文件进行解压缩,以得到所述记录文件;
在一个实施例中,对于压缩文件,可以通过与所述压缩算法对应的解压算法进行解压,例如压缩算法为霍夫曼编码算法,那么可以通过霍夫曼编码算法对应的解压算法对压缩文件进行解压。
步骤S3,根据所述记录文件对根据所述图像传感器生成的图像进行校正。其中,校正所使用的算法包括但不限于ISP(Image Signal Processing,图像信号处理)算法。
在一个实施例中,根据解压得到的记录文件可以对图像传感器生成的图像进行校正,例如根据记录文件可以确定图2所示的图像传感器中第二行第三列标识为p12的感光元件和第五行第四列标识为p43的感光元件为坏点,针对这两个坏点在图像中对应位置处的像素值,可以基于周围其他位置的像素值加权求和来确定。
根据本公开的实施例,由于图像传感器中一般坏点数量较少,正常点数量较多,所以记录文件中正常点标识较多,并且是连续的,而坏点标识较少。那么在压缩时,对于记录文件可以以较大的压缩速率,实现较大压缩比的压缩,使得压缩后的压缩文件相对压缩前的记录文件极大地降低数据量。
进而通过存储器存储压缩文件,相对直接存储记录文件,可以节约大量的存储空间。并且从存储空间中读取压缩文件,相对读取记录文件的速度也可以得到提高,从而可以快速读取压缩文件,并完成对图像的校正和显示等后续操作。
图4是根据本公开的实施例示出的另一种图像校正方法的示意流程图。如图4所示,所述从所述存储器中读取压缩文件包括:
步骤S11,从非易失存储器中读取所述压缩文件;
步骤S12,将所述压缩文件加载到内存中。
在一个实施例中,存储器压缩文件的存储器可以是非易失存储器(例如flash),由于非易失存储器在断电时,存储的数据也不会丢失,从而可以良好地保存压缩文件。进而将读取出来的压缩文件加载到内存中,由于存储的存储和读取速度都很快,因此便于后续对压缩文件进行解压时,从内存中读取 压缩文件进行解压缩。
可选地,所述内存包括静态随机存取存储器和/或动态随机存取存储器。
在一个实施例中,可以将静态随机存取存储器(Static Random-Access Memory,简称SRAM)作为内存,也可以将动态随机存取存储器(Dynamic Random Access Memory,简称DRAM)作为内存。
SRAM和DRAM,DRAM的结构相对简单,在电子设备中占用空间较小,所以基于本实施例通过DRAM存储压缩文件,主要可以降低对DRAM内存带宽的占用,而SRAM的结构相对复杂,在电子设备中占用空间较大,所以基于本实施例通过SRAM存储压缩文件,主要可以降低SRAM对电子设备中空间的占用。
可选地,所述记录文件包括位图文件。
在一个实施例中,可以将位图文件bitmap作为记录文件,由于位图文件可以以如图3所示的阵列的形式存储数据,而图像传感器中坏点和正常点也是按照阵列分布的,因此便于记录由感光元件阵列构成的图像传感器中的坏点。
可选地,所述位图文件的分辨率与所述图像传感器的分辨率相同。
在一个实施例中,可以设置位图文件的分辨率与图像传感器的分辨率相同,从而通过位图文件可以完整的存储图像传感器中坏点的坏点标识和正常点的正常点标识,并且不会剩余未存储标识的位置,从而减少位图文件中未存储数据的部分占用存储空间。
可选地,所述图像传感器中的感光元件为互补金属氧化物半导体(也即CMOS)传感器。除了CMOS传感器,也可以根据需要选择其他材料的传感器作为感光元件。
可选地,所述压缩算法为无损压缩算法。
在一个实施例中,由于压缩算法是无损压缩算法,压缩记录文件并不会使得记录文件中的数据丢失,所要解压得到的记录文件与压缩前的记录文件是相同的,从而基于解压得到的记录文件可以准确地确定图像传感器中的坏 点。
可选地,所述无损压缩算法包括以下至少之一:
霍夫曼编码、算术编码、游程编码。
图5是根据本公开的实施例示出的一种生成压缩文件的示意流程图。如图5所示,所述压缩文件通过以下方式生成:
步骤S1’,确定所述记录文件中坏点与所述记录文件中所有点的比例;
步骤S2’,若所述比例小于预设值,通过压缩算法压缩所述记录文件以生成压缩文件。
在一个实施例中,在某些特殊情况下,图像传感器中的坏点较多,也即记录文件中的坏点较多,在这种情况下,记录文件中正常点就较少,那么正常点标识就较少,从而正常点标识连续重复出现的情况也就较少,在这种情况下对记录文件进行压缩,压缩速率较慢。
所以可以先确定记录文件中坏点与记录文件中所有点的比例,在该比例小于预设值(可以根据需要进行设置,例如1/10)的情况下,可以确定坏点较少,而正常点较多,那么可以通过压缩算法压缩所述记录文件以生成压缩文件,以实现较大的压缩速率和较大的压缩比。
而在该比例大于或等于预设值的情况下,可以确定坏点较多,而正常点较少,那么可以直接向记录文件存储在存储器中,以避免压缩过程浪费过多的时间。
图6是根据本公开的实施例示出的又一种图像校正方法的示意流程图。如图6所示,所述通过与所述无损压缩算法对应的解压算法包括:
步骤S31,通过ASIC(Application Specific Integrated Circuit,特殊应用集成电路)芯片对所述压缩文件进行解压缩;
其中,所述ASIC芯片在设计阶段集成了所述解压算法对应的功能模块。
在一个实施例中,可以通过ASCI芯片对压缩文件进行解压,由于ASIC芯片并不是可编程的,所以需要在设计阶段集成解压算法对应的功能模块,以便出厂后能够实现通过所述解压算法解压压缩文件。
图7是根据本公开的实施例示出的又一种图像校正方法的示意流程图。如图7所示,所述通过与所述无损压缩算法对应的解压算法包括:
步骤S32,通过FPGA(Field-Programmable Gate Array,可编程逻辑门阵列)对所述压缩文件进行解压缩;
其中,所述FPGA在开发阶段加入了对所述解压算法的支持。
在一个实施例中,可以通过FPGA对压缩文件进行解压,由于FPGA是可编程的,因此可以在开发阶段加入对解压算法对应的支持,使得用户可以根据需要配置FPGA的功能使得FPGA能够实现通过所述解压算法解压压缩文件。
图8是根据本公开的实施例示出的一种校正图像的示意图。如图8所示,可以通过ASIC芯片或者FPGA实现图像校正功能,其中可以包括存储器,解压模块和校正模块。
在存储器中存储有压缩文件,从存储器中读取出压缩文件后,可以输入到解压模块,解压模块可以通过压缩文件是所采用的压缩算法对应的解压算法解压所述压缩文件,然后将解压得到的记录文件输入到校正模块,校正模块根据记录文件中的坏点对校正前的图像数据进行校正,得到校正后的图像数据。
与上述图像校正方法的实施例相对应地,本公开还提出了图像校正装置的实施例。
本公开图像校正装置的实施例可以应用在服务器上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在服务器的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图9所示,为本公开图像校正装置所在服务器的一种硬件结构图,除了图9所示的处理器、网络接口、内存以及非易失性存储器之外,实施例中装置所在的服务器通常还可以包括其他硬件,如负责处理报文的转发芯片等等;从硬件结构上来讲该服务器还可能是分布式的设备,可能包括多个接口卡,以 便在硬件层面进行报文处理的扩展。
本公开的实施例还提出一种图像校正装置,包括存储器,还包括单独或者协同工作的一个或者多个处理器,所述处理器用于:
从所述存储器中读取压缩文件,其中,所述压缩文件为通过压缩算法压缩的记录文件,所述记录文件用于记录图像传感器中的坏点;
通过与所述压缩算法对应的解压算法,对所述压缩文件进行解压缩,以得到所述记录文件;
根据所述记录文件对根据所述图像传感器生成的图像进行校正。
在一个实施例中,所述处理器用于:
从非易失存储器中读取所述压缩文件;
将所述压缩文件加载到内存中。
在一个实施例中,所述内存包括静态随机存取存储器和/或动态随机存取存储器。
在一个实施例中,所述记录文件包括位图文件。
在一个实施例中,所述位图文件的分辨率与所述图像传感器的分辨率相同。
在一个实施例中,所述图像传感器中的感光元件为互补金属氧化物半导体传感器。
在一个实施例中,所述压缩算法为无损压缩算法。
在一个实施例中,所述无损压缩算法包括以下至少之一:
霍夫曼编码、算术编码、游程编码。
在一个实施例中,所述处理器还用于:
确定所述记录文件中坏点与所述记录文件中所有点的比例;
若所述比例小于预设值,通过压缩算法压缩所述记录文件以生成压缩文件。
在一个实施例中,所述处理器用于:
通过ASIC芯片对所述压缩文件进行解压缩;
其中,所述ASIC芯片在设计阶段集成了所述解压算法对应的功能模块。
在一个实施例中,所述处理器用于:
通过FPGA对所述压缩文件进行解压缩;
其中,所述FPGA在开发阶段加入了对所述解压算法的支持。
本公开的实施例还提出一种一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为实现上述任一实施例所述的图像校正方法。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要 素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (23)

  1. 一种图像校正方法,其特征在于,适用于电子设备,所述电子设备包括存储器,所述方法包括:
    从所述存储器中读取压缩文件,其中,所述压缩文件为通过压缩算法压缩的记录文件,所述记录文件用于记录图像传感器中的坏点;
    通过与所述压缩算法对应的解压算法,对所述压缩文件进行解压缩,以得到所述记录文件;
    根据所述记录文件对根据所述图像传感器生成的图像进行校正。
  2. 根据权利要求1所述的方法,其特征在于,所述从所述存储器中读取压缩文件包括:
    从非易失存储器中读取所述压缩文件;
    将所述压缩文件加载到内存中。
  3. 根据权利要求2所述的方法,其特征在于,所述内存包括静态随机存取存储器和/或动态随机存取存储器。
  4. 根据权利要求1所述的方法,其特征在于,所述记录文件包括位图文件。
  5. 根据权利要求4所述的方法,其特征在于,所述位图文件的分辨率与所述图像传感器的分辨率相同。
  6. 根据权利要求1所述的方法,其特征在于,所述图像传感器中的感光元件为互补金属氧化物半导体传感器。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述压缩算法为无损压缩算法。
  8. 根据权利要求7所述的方法,其特征在于,所述无损压缩算法包括以下至少之一:
    霍夫曼编码、算术编码、游程编码。
  9. 根据权利要求1至6中任一项所述的方法,其特征在于,所述压缩文件通过以下方式生成:
    确定所述记录文件中坏点与所述记录文件中所有点的比例;
    若所述比例小于预设值,通过压缩算法压缩所述记录文件以生成压缩文件。
  10. 根据权利要求1至6中任一项所述的方法,其特征在于,所述通过与所述压缩算法对应的解压算法包括:
    通过ASIC芯片对所述压缩文件进行解压缩;
    其中,所述ASIC芯片在设计阶段集成了所述解压算法对应的功能模块。
  11. 根据权利要求1至6中任一项所述的方法,其特征在于,所述通过与所述压缩算法对应的解压算法包括:
    通过FPGA对所述压缩文件进行解压缩;
    其中,所述FPGA在开发阶段加入了对所述解压算法的支持。
  12. 一种图像校正装置,其特征在于,包括存储器,还包括单独或者协同工作的一个或者多个处理器,所述处理器用于:
    从所述存储器中读取压缩文件,其中,所述压缩文件为通过压缩算法压缩的记录文件,所述记录文件用于记录图像传感器中的坏点;
    通过与所述压缩算法对应的解压算法,对所述压缩文件进行解压缩,以得到所述记录文件;
    根据所述记录文件对根据所述图像传感器生成的图像进行校正。
  13. 根据权利要求12所述的装置,其特征在于,所述处理器用于:
    从非易失存储器中读取所述压缩文件;
    将所述压缩文件加载到内存中。
  14. 根据权利要求13所述的装置,其特征在于,所述内存包括静态随机存取存储器和/或动态随机存取存储器。
  15. 根据权利要求12所述的装置,其特征在于,所述记录文件包括位图文件。
  16. 根据权利要求15所述的装置,其特征在于,所述位图文件的分辨率与所述图像传感器的分辨率相同。
  17. 根据权利要求12所述的装置,其特征在于,所述图像传感器中的感光元件为互补金属氧化物半导体传感器。
  18. 根据权利要求12至17中任一项所述的装置,其特征在于,所述压缩算法为无损压缩算法。
  19. 根据权利要求18所述的装置,其特征在于,所述无损压缩算法包括以下至少之一:
    霍夫曼编码、算术编码、游程编码。
  20. 根据权利要求12至17中任一项所述的装置,其特征在于,所述处理器还用于:
    确定所述记录文件中坏点与所述记录文件中所有点的比例;
    若所述比例小于预设值,通过压缩算法压缩所述记录文件以生成压缩文件。
  21. 根据权利要求12至17中任一项所述的装置,其特征在于,所述处理器用于:
    通过ASIC芯片对所述压缩文件进行解压缩;
    其中,所述ASIC芯片在设计阶段集成了所述解压算法对应的功能模块。
  22. 根据权利要求12至17中任一项所述的装置,其特征在于,所述处理器用于:
    通过FPGA对所述压缩文件进行解压缩;
    其中,所述FPGA在开发阶段加入了对所述解压算法的支持。
  23. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为实现权利要求1至11中任一项所述的图像校正方法。
PCT/CN2019/093840 2019-06-28 2019-06-28 图像校正方法和图像校正装置以及电子设备 WO2020258287A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980011443.1A CN111713099A (zh) 2019-06-28 2019-06-28 图像校正方法和图像校正装置以及电子设备
PCT/CN2019/093840 WO2020258287A1 (zh) 2019-06-28 2019-06-28 图像校正方法和图像校正装置以及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/093840 WO2020258287A1 (zh) 2019-06-28 2019-06-28 图像校正方法和图像校正装置以及电子设备

Publications (1)

Publication Number Publication Date
WO2020258287A1 true WO2020258287A1 (zh) 2020-12-30

Family

ID=72536663

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093840 WO2020258287A1 (zh) 2019-06-28 2019-06-28 图像校正方法和图像校正装置以及电子设备

Country Status (2)

Country Link
CN (1) CN111713099A (zh)
WO (1) WO2020258287A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113532801A (zh) * 2021-06-24 2021-10-22 四川九洲电器集团有限责任公司 基于分布分位数的高/多光谱相机坏点检测方法及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070201052A1 (en) * 2006-02-24 2007-08-30 Holden Caine Method and Apparatus for Selective Editing of an Automatic Digital Image Correction
CN102075688A (zh) * 2010-12-28 2011-05-25 青岛海信网络科技股份有限公司 单帧双曝光图像宽动态处理方法
CN103595935A (zh) * 2013-10-15 2014-02-19 深圳市掌网立体时代视讯技术有限公司 一种三维视频图像坏点的动态补偿方法及系统
CN103905821A (zh) * 2014-04-23 2014-07-02 深圳英飞拓科技股份有限公司 能够识别人脸的视频编码方法及装置
CN107005657A (zh) * 2016-10-13 2017-08-01 深圳市大疆创新科技有限公司 处理数据的方法、装置、芯片和摄像头
CN206575490U (zh) * 2017-03-16 2017-10-20 刘西成 图像处理系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070201052A1 (en) * 2006-02-24 2007-08-30 Holden Caine Method and Apparatus for Selective Editing of an Automatic Digital Image Correction
CN102075688A (zh) * 2010-12-28 2011-05-25 青岛海信网络科技股份有限公司 单帧双曝光图像宽动态处理方法
CN103595935A (zh) * 2013-10-15 2014-02-19 深圳市掌网立体时代视讯技术有限公司 一种三维视频图像坏点的动态补偿方法及系统
CN103905821A (zh) * 2014-04-23 2014-07-02 深圳英飞拓科技股份有限公司 能够识别人脸的视频编码方法及装置
CN107005657A (zh) * 2016-10-13 2017-08-01 深圳市大疆创新科技有限公司 处理数据的方法、装置、芯片和摄像头
CN206575490U (zh) * 2017-03-16 2017-10-20 刘西成 图像处理系统

Also Published As

Publication number Publication date
CN111713099A (zh) 2020-09-25

Similar Documents

Publication Publication Date Title
US10319115B2 (en) Image compression device
US20190364230A1 (en) Method of processing data for dynamic vision sensor, dynamic vision sensor performing the same and electronic device including the same
CN109614372B (zh) 一种对象存储、读取方法、装置、及业务服务器
US10904436B2 (en) Image sensor and electronic device including the image sensor
CN110888521A (zh) 一种移动终端及其运行应用程序的方法
GB2575137A (en) An image sensor and an image dynamic information processing method
US20120027320A1 (en) Image processing apparatus and image processing method
US9363526B2 (en) Video and image compression based on position of the image generating device
US20120294487A1 (en) Object detecting device, image dividing device, integrated circuit, method of detecting object, object detecting program, and recording medium
WO2020258287A1 (zh) 图像校正方法和图像校正装置以及电子设备
US20110149147A1 (en) Image processing apparatus for reading compressed data from memory via data bus and image processing method performed in the image processing apparatus
US7103702B2 (en) Memory device
US11887282B2 (en) Noise removing circuit, image sensing device and operation method of the same
US8548275B2 (en) Image processing device and image processing method
CN115080305A (zh) 一种基于重复读取的数据恢复方法、系统及电子设备
US20200225877A1 (en) Information processing apparatus and memory control method
CN113225493A (zh) 图像传感器模块、其图像压缩方法及电子装置
US10748305B2 (en) Image capturing apparatus that can reduce amount of data that is to be recorded, method for controlling the image capturing apparatus, and storage medium
US10244179B2 (en) Image processing apparatus, image capturing apparatus, control method, and recording medium
CN114266697A (zh) 图像处理和模型训练方法、装置、电子设备及存储介质
US10140689B2 (en) Efficient path-based method for video denoising
JP6225137B2 (ja) 車載カメラ画像処理装置
JP2015128263A (ja) 画像処理装置、画像処理方法、画像処理用プログラム、および、撮像装置
US20220392207A1 (en) Information processing apparatus, information processing method, and non-transitory computer-readable storage medium
EP3619679A1 (en) Chromatic aberration modeling in image compression and enhancement

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19934881

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19934881

Country of ref document: EP

Kind code of ref document: A1