CN114581380A - Dispersion correction method based on FPGA and storage medium - Google Patents
Dispersion correction method based on FPGA and storage medium Download PDFInfo
- Publication number
- CN114581380A CN114581380A CN202210142266.4A CN202210142266A CN114581380A CN 114581380 A CN114581380 A CN 114581380A CN 202210142266 A CN202210142266 A CN 202210142266A CN 114581380 A CN114581380 A CN 114581380A
- Authority
- CN
- China
- Prior art keywords
- pixel
- integer
- fpga
- offset
- correction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
本发明的一种基于FPGA的色散矫正方法及存储介质,其方法包括以下步骤,接收图像数据流,并使用片内RAM存储相邻的4个时钟周期的数据;根据校正前后的边界偏移量选择校正方式;对每行数据以中心进行分段处理;使用统一数学模型进行色散校正处理;实时输出校正后的图像。本发明的基于FPGA的色散矫正方法,使用FPGA内的硬件算法,对图像进行并行处理,抵消在成像中光通过镜头后在感光元件上产生的色散现象。并采用流水线处理方式进一步提高算法效率。该算法支持对图像进行实时处理,无需预设色差补偿表,只需简单参数输入,在实时处理中计算不同像素的对应偏移量,这种方式更加灵活,可应用在各种复杂变化的场景中。
An FPGA-based dispersion correction method and storage medium of the present invention includes the following steps: receiving an image data stream, and using an on-chip RAM to store data of four adjacent clock cycles; Select the correction method; process each line of data in segments with the center; use a unified mathematical model for dispersion correction processing; output the corrected image in real time. The FPGA-based dispersion correction method of the present invention uses the hardware algorithm in the FPGA to process the image in parallel, so as to offset the dispersion phenomenon on the photosensitive element after the light passes through the lens during imaging. And the pipeline processing method is used to further improve the efficiency of the algorithm. The algorithm supports real-time processing of images without preset chromatic aberration compensation table. It only needs simple parameter input, and calculates the corresponding offsets of different pixels in real-time processing. This method is more flexible and can be applied to various complex and changing scenes. middle.
Description
技术领域technical field
本发明涉及图像处理技术领域,具体涉及一种基于FPGA的色散矫正方法。The invention relates to the technical field of image processing, in particular to an FPGA-based dispersion correction method.
背景技术Background technique
随着工业繁荣发展,高速工业相机在使用中面临着更复杂的场景需求。在实际使用中,拍摄图像会出现色散现象,对成像效果造成了影响。这是由于镜头对于不同波长光的折射率不同,因此光在通过透镜组折射到传感器时,会出现不同波长的光汇聚点不同的现象。这种现象在距离成像中心远的地方会更加严重和明显。With the prosperity and development of industry, high-speed industrial cameras face more complex scene requirements in use. In actual use, the captured image will appear dispersion phenomenon, which will affect the imaging effect. This is because the refractive index of the lens for different wavelengths of light is different, so when the light is refracted to the sensor through the lens group, different wavelengths of light will converge at different points. This phenomenon is more severe and obvious at places far from the imaging center.
为了改善成像质量,抵消色散现象,目前已有的方案主要有两种,但都存在着一些问题:第一种主要是通过光学方法进行消除,如消色差镜片等来改善甚至抵消色散情况,但是这种方法需要对光学结构重新考虑,增加了光学和硬件架构设计的复杂度,增加了成本。第二种主要是通过将数据存储,在图像获取结束后通过软件算法等进行处理。该方法的处理效率较低,这导致其的使用具有较大的场景限制,不适用于高速实时图像采集系统中。In order to improve the image quality and offset the dispersion phenomenon, there are mainly two existing solutions, but there are some problems: the first one is mainly to eliminate the dispersion through optical methods, such as achromatic lenses to improve or even offset the dispersion, but This approach requires a reconsideration of the optical structure, increases the complexity of the optical and hardware architecture design, and increases the cost. The second is mainly by storing the data and processing it through software algorithms after the image acquisition is completed. The processing efficiency of this method is low, which leads to its use with large scene limitations and is not suitable for high-speed real-time image acquisition systems.
为了解决以上问题,同时考虑到工业相机的高速实时传输场景,并且为了尽可能的降低工业相机设计中的复杂度和成本,需要采用一种具有高效、实时性和低成本的色散矫正方法。In order to solve the above problems, taking into account the high-speed real-time transmission scene of industrial cameras, and in order to reduce the complexity and cost of industrial camera design as much as possible, it is necessary to adopt an efficient, real-time and low-cost dispersion correction method.
发明内容SUMMARY OF THE INVENTION
本发明提出的一种基于FPGA的色散矫正方法,可至少解决上述技术问题之一。The FPGA-based dispersion correction method proposed by the present invention can at least solve one of the above technical problems.
为实现上述目的,本发明采用了以下技术方案:To achieve the above object, the present invention has adopted the following technical solutions:
一种基于FPGA的色散矫正方法,包括:An FPGA-based dispersion correction method, comprising:
接收图像数据流,并使用片内RAM存储相邻的4个时钟周期的数据;Receive the image data stream, and use the on-chip RAM to store the data of the adjacent 4 clock cycles;
根据校正前后的边界偏移量选择校正方式;Select the correction method according to the boundary offset before and after correction;
对每行数据以中心进行分段处理;Segment each row of data by center;
使用统一数学模型进行色散校正处理;Dispersion correction processing using unified mathematical model;
实时输出校正后的图像。The corrected image is output in real time.
进一步的,所述接收图像数据流,并使用片内RAM存储相邻的4个时钟周期的数据,具体包括,Further, described receiving the image data stream, and using the on-chip RAM to store the data of the adjacent 4 clock cycles, specifically including,
在实际照明条件下获得图像,图像以流式数据在FPGA内进行传输,在每个时钟周期传输M个数据,使用片内RAM存储相邻的4个时钟周期的数据,在进行校正前每一行的数据记为R[n],其中n为该像素值的列值;The image is acquired under actual lighting conditions, the image is transmitted in the FPGA as streaming data, M data is transmitted in each clock cycle, the data of the adjacent 4 clock cycles is stored in the on-chip RAM, and each line is before correction. The data is recorded as R[n], where n is the column value of the pixel value;
整个过程视为将长度为L的长条,保持中点不变的情况下,拉伸为L′,则其伸缩系数为最边界处像素的偏移量视为x,假设该感光元件的水平分辨率为2HPixel,伸缩系数表达式如下式:The whole process is regarded as a long strip of length L, keeping the midpoint unchanged, stretched to L', then its expansion coefficient is The offset of the pixel at the most boundary is regarded as x. Assuming that the horizontal resolution of the photosensitive element is 2H Pixel , the scaling factor is expressed as follows:
进一步的,所述对每行数据以中心进行分段处理,具体包括,Further, the process of segmenting each row of data with a center specifically includes:
从每行数据中心将其等分为两半进行分段处理,分别为0≤n≤HPixel-1,HPixel≤n≤2HPixel-1。From the data center of each row, it is divided into two halves for segmentation processing, respectively 0≤n≤H Pixel -1, H Pixel ≤n≤2H Pixel -1.
进一步的,所述使用统一数学模型进行色散校正处理,具体包括,Further, the use of a unified mathematical model to perform dispersion correction processing specifically includes:
将校正前后的边界像素的偏移量设为x,根据实际情况选择整数像素校正或半整数像素校正;Set the offset of the boundary pixels before and after correction as x, and select integer pixel correction or half-integer pixel correction according to the actual situation;
若偏移量为整数,则之后使用校正前整数像素的值进行插值计算;若边界像素的偏移量为之前某两个相邻整数像素的插值,则之后使用半整数像素校正;If the offset is an integer, then use the value of the integer pixel before correction for interpolation calculation; if the offset of the boundary pixel is the interpolation of two adjacent integer pixels before, then use half-integer pixel correction;
前者即x为整数值,后者即x为半整数值,将偏移量使coef为整数值来代表每种偏移量,其为奇数时,将对应整数偏移量;若为偶数则对应半整数偏移量。The former means that x is an integer value, and the latter means that x is a half-integer value. Let coef be an integer value to represent each offset, if it is odd, it will correspond to an integer offset; if it is even, it will correspond to a half-integer offset.
进一步的,所述使用统一数学模型进行色散校正处理,还包括,Further, the use of a unified mathematical model to perform dispersion correction processing also includes:
在伸缩前假设其像素值为R[n],伸缩后像素值为R′[n],根据伸缩系数及线性插值插值算法,通过归纳法得到校正后的表达式:The pixel value is assumed to be R[n] before scaling, and the pixel value after scaling is R'[n]. According to the scaling coefficient and the linear interpolation algorithm, the corrected expression is obtained by induction:
当0≤n≤HPixel-1时, 即看到校正后的像素值由两个相关像素值线性插值得到,将计算中的复杂运算分解至多步进行,具体包括以下步骤,When 0≤n≤H Pixel -1, That is, it can be seen that the corrected pixel value is obtained by linear interpolation of two related pixel values, and the complex operation in the calculation is decomposed into multiple steps, which specifically includes the following steps:
5.1)计算校正后的被插值像素的坐标index(n),其中 5.1) Calculate the coordinate index(n) of the corrected pixel to be interpolated, where
5.2)计算线性插值系数a,其计算表达式为a=n(coef+1);5.2) Calculate the linear interpolation coefficient a, and its calculation expression is a=n(coef+1);
5.3)完成R[index(n)]和R[index(n)+1]和对应线性插值系数的相乘;5.3) Complete the multiplication of R[index(n)] and R[index(n)+1] and the corresponding linear interpolation coefficient;
5.4)执行R[index(n)]×a和R[index(n)+1]×(2HPixel-a)的加法;5.4) Perform the addition of R[index(n)]×a and R[index(n)+1]×(2H Pixel -a);
5.5)对5.4)中计算结果通过移位来完成对2HPixel的除法计算。5.5) Complete the division calculation of 2H Pixel by shifting the calculation result in 5.4).
另一方面,本发明还公开一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如上述方法的步骤。On the other hand, the present invention also discloses a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, causes the processor to execute the steps of the above method.
由上述技术方案可知,本发明的基于FPGA的色散矫正方法,使用FPGA内的硬件算法,对图像进行并行处理,抵消在成像中光通过镜头后在感光元件上产生的色散现象。并采用流水线处理方式进一步提高算法效率。It can be seen from the above technical solutions that the FPGA-based dispersion correction method of the present invention uses the hardware algorithm in the FPGA to perform parallel processing on the image to offset the dispersion phenomenon on the photosensitive element after the light passes through the lens during imaging. And the pipeline processing method is used to further improve the efficiency of the algorithm.
本发明提供了一种基于FPGA的色差矫正算法,避免色散现象影响到工业相机的成像效果,且利用FPGA的并行性和流水线完成对图像的高效实时处理。The invention provides an FPGA-based chromatic aberration correction algorithm, which avoids chromatic dispersion from affecting the imaging effect of an industrial camera, and utilizes the parallelism and pipeline of the FPGA to complete efficient real-time image processing.
与现有技术相比,本发明的优点和积极效果是:Compared with the prior art, the advantages and positive effects of the present invention are:
1、该算法支持对图像进行实时处理,无需预设色差补偿表,只需简单参数输入,在实时处理中计算不同像素的对应偏移量,这种方式更加灵活,可应用在各种复杂变化的场景中。1. This algorithm supports real-time processing of images without preset chromatic aberration compensation table, only simple parameter input is required, and the corresponding offsets of different pixels are calculated in real-time processing. This method is more flexible and can be applied to various complex changes. in the scene.
2、采用流水线和并行处理方式,将复杂运算拆解为多步流水线进行,提高模块处理效率。2. Using pipeline and parallel processing methods, disassemble complex operations into multi-step pipelines to improve module processing efficiency.
3、使用统一的数学模型可应对复杂的色散场景,支持半像素和整数像素的色散校正。3. Use a unified mathematical model to deal with complex dispersion scenes, and support half-pixel and integer-pixel dispersion correction.
4、所需计算资源少,无需较大存储资源将整个图像存储后进行处理。4. Less computing resources are required, and the entire image is stored and processed without large storage resources.
5、避免了复杂的光学和硬件结构进行校正,利用已有的FPGA,对图像进行硬件算法处理。5. It avoids the complex optical and hardware structure correction, and uses the existing FPGA to perform hardware algorithm processing on the image.
附图说明Description of drawings
图1是本发明的方法原理示意图;Fig. 1 is the method principle schematic diagram of the present invention;
图2是本发明的方法流程图。Figure 2 is a flow chart of the method of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments.
本发明实施例提供了一种基于FPGA的色差矫正算法,避免色散现象影响到工业相机的成像效果,利用FPGA的并行性和流水线完成对图像的高效实时处理,为高分辨率相机实现实时色散校正算法提供可能,在线阵和面阵相机上均可进行应用。The embodiment of the present invention provides an FPGA-based chromatic aberration correction algorithm, which avoids the chromatic dispersion from affecting the imaging effect of an industrial camera, utilizes the parallelism and pipeline of the FPGA to complete efficient real-time processing of images, and realizes real-time chromatic dispersion correction for high-resolution cameras The algorithm provides the possibility, and can be applied to both line scan and area scan cameras.
在通过镜头折射后,RGB不同分量在感光元件上长度发生了变化,考虑到光的成像特点,在成像中心处,不同波长的光汇聚点相同;当汇聚点远离成像中心时,其汇聚点偏移程度加大。因此为了完成色散校正,需要对色散后的成像进行绕成像中心对称拉伸。如图1所示,若进一步将其量化,可视为将长度为L的长条,保持中点不变的情况下,拉伸为L′,则其伸缩系数为最边界处像素的偏移量视为x。After being refracted through the lens, the lengths of different RGB components on the photosensitive element change. Considering the imaging characteristics of light, at the imaging center, the light converging points of different wavelengths are the same; when the converging point is far away from the imaging center, the converging points are offset. The degree of shift is increased. Therefore, in order to complete the dispersion correction, the image after dispersion needs to be stretched symmetrically around the imaging center. As shown in Figure 1, if it is further quantified, it can be regarded as a long strip of length L, keeping the midpoint unchanged, stretched to L', then its expansion coefficient is The offset of the pixel at the most border is taken as x.
具体的说,如图2所示,本发明提供了一种基于FPGA的色差矫正算法具体步骤如下:Specifically, as shown in FIG. 2 , the present invention provides an FPGA-based chromatic aberration correction algorithm. The specific steps are as follows:
接收图像数据流,并使用片内RAM存储相邻的4个时钟周期的数据;Receive the image data stream, and use the on-chip RAM to store the data of the adjacent 4 clock cycles;
根据校正前后的边界偏移量选择校正方式;Select the correction method according to the boundary offset before and after correction;
对每行数据以中心进行分段处理;Segment each row of data by center;
使用统一数学模型进行色散校正处理;Dispersion correction processing using unified mathematical model;
实时输出校正后的图像。The corrected image is output in real time.
以下具体说明:The following specific instructions:
1)在实际照明条件下获得图像,图像以流式数据在FPGA内进行传输,在每个时钟周期传输M个数据,使用片内RAM存储相邻的4个时钟周期的数据。在进行校正前每一行的数据记为R[n],其中n为该像素值的列值。假设该感光元件的水平分辨率为2HPixel。1) The image is obtained under the actual lighting conditions, the image is transmitted in the FPGA as streaming data, M data is transmitted in each clock cycle, and the on-chip RAM is used to store the data of the adjacent 4 clock cycles. The data of each row before correction is denoted as R[n], where n is the column value of the pixel value. Assume that the horizontal resolution of the sensor is 2H Pixel .
2)从每行数据中心将其等分为两半进行分段处理,分别为0≤n≤HPixel-1,HPixel≤n≤2HPixel-1。2) From the data center of each row, it is equally divided into two halves for segmentation processing, respectively 0≤n≤H Pixel -1, H Pixel ≤n≤2H Pixel -1.
3)整个过程视为将长度为L的长条,保持中点不变的情况下,拉伸为L′,则其伸缩系数为最边界处像素的偏移量视为x。伸缩系数表达式如下式:3) The whole process is regarded as a long strip of length L, keeping the midpoint unchanged, stretched to L', then its expansion coefficient is The offset of the pixel at the most border is taken as x. The expansion coefficient expression is as follows:
4)将校正前后的边界像素的偏移量设为x,根据实际情况选择整数像素校正或半整数像素校正。若偏移量为整数,则之后使用校正前整数像素的值进行插值计算;若边界像素的偏移量为之前某两个相邻整数像素的插值,则之后使用半整数像素校正。前者即x=1,2,3等整数值,后者即x=0.5,1.5,2.5等半整数值。考虑到在硬件中整数运算相比于浮点数运算消耗资源更小,将偏移量使coef为整数值来代表每种偏移量,其为奇数时,将对应整数偏移量;若为偶数则对应半整数偏移量。4) Set the offset of the boundary pixels before and after correction as x, and select integer pixel correction or half-integer pixel correction according to the actual situation. If the offset is an integer, then the value of the integer pixel before correction is used for interpolation calculation; if the offset of the boundary pixel is the interpolation of two adjacent integer pixels before, then half-integer pixel correction is used later. The former is an integer value such as x=1, 2, 3, and the latter is a half-integer value such as x=0.5, 1.5, 2.5. Considering that integer operations in hardware consume less resources than floating-point operations, set the offset Let coef be an integer value to represent each offset, if it is odd, it will correspond to an integer offset; if it is even, it will correspond to a half-integer offset.
5)根据伸缩系数及线性插值插值算法,通过归纳法得到校正后的表达式:5) According to the expansion coefficient and the linear interpolation interpolation algorithm, the corrected expression is obtained by induction:
当0≤n≤HPixel-1时, When 0≤n≤H Pixel -1,
,可看到校正后的像素值由两个相关像素值线性插值得到。考虑到FPGA内的运算特点,步骤五使用如图1所示的流水线方式,将计算中的复杂运算分解至多步进行,来避免高时钟评率造成的时序紧张问题。, it can be seen that the corrected pixel value is obtained by linear interpolation of two related pixel values. Taking into account the operation characteristics in the FPGA, step 5 uses the pipeline method shown in Figure 1 to decompose the complex operation in the calculation into multiple steps to avoid the timing tension problem caused by the high clock evaluation rate.
5.1)计算校正后的被插值像素的坐标index(n),其中 5.1) Calculate the coordinate index(n) of the corrected pixel to be interpolated, where
5.2)计算线性插值系数a,其计算表达式为a=n(coef+1);5.2) Calculate the linear interpolation coefficient a, and its calculation expression is a=n(coef+1);
5.3)完成R[index(n)]和R[index(n)+1]和对应线性插值系数的相乘;5.3) Complete the multiplication of R[index(n)] and R[index(n)+1] and the corresponding linear interpolation coefficient;
5.4)执行R[index(n)]×a和R[index(n)+1]×(2HPixel-a)的加法;5.4) Perform the addition of R[index(n)]×a and R[index(n)+1]×(2H Pixel -a);
5.5)对5.4)中计算结果通过移位来完成对2HPixel的除法计算。5.5) Complete the division calculation of 2H Pixel by shifting the calculation result in 5.4).
6)将实时校正后的数据继续传输至别的图像处理模块。6) Continue to transmit the real-time corrected data to other image processing modules.
具体的说,本发明实施例考虑到实际成像中情况较为复杂,校正过程中的边界像素的偏移量x有多种可能,在校正中主要抽象为两种校正:整数像素和半像素校正。整数像素校正指将校正中边界像素的偏移量为之前某整数像素的值。半像素校正为校正中边界像素的偏移量为之前某两个相邻整数像素的插值。前者即x=1,2,3等整数值,后者即x=0.5,1.5,2.5等半整数值。考虑到在硬件中整数运算相比于浮点数运算消耗资源更小,将偏移量使coef为整数值来代表每种偏移量,其为奇数时,将对应整数偏移量;若为偶数则对应半整数偏移量。Specifically, in the embodiment of the present invention, considering that the actual imaging situation is relatively complicated, there are many possibilities for the offset x of the boundary pixels in the correction process, and the correction is mainly abstracted into two corrections: integer pixel correction and half pixel correction. Integer pixel correction refers to setting the offset of the boundary pixel in the correction to the value of a previous integer pixel. Half-pixel correction means that the offset of the boundary pixel in the correction is the interpolation of some two adjacent integer pixels before. The former is an integer value such as x=1, 2, 3, and the latter is a half-integer value such as x=0.5, 1.5, 2.5. Considering that integer operations in hardware consume less resources than floating-point operations, set the offset Let coef be an integer value to represent each offset, if it is odd, it will correspond to an integer offset; if it is even, it will correspond to a half-integer offset.
假设该感光元件的水平分辨率为2HPixel,每个像素可抽象为n,考虑到实际成像过程,图像关于成像中心呈中心对称,因此需要对该模型进行分段处理。即需要将像素分为两段:0≤n≤HPixel-1,HPixel≤n≤2HPixel-1。在伸缩前假设其像素值为R[n],伸缩后像素值为R′[n]。以第一段为例,使用归纳法计算R[n]和R′[n]间的关系。Assuming that the horizontal resolution of the photosensitive element is 2H Pixel , each pixel can be abstracted as n. Considering the actual imaging process, the image is centrally symmetric about the imaging center, so the model needs to be segmented. That is, the pixels need to be divided into two segments: 0≤n≤H Pixel -1, H Pixel ≤n≤2H Pixel -1. The pixel value is assumed to be R[n] before scaling, and the pixel value after scaling is R'[n]. Using the first paragraph as an example, use induction to calculate the relationship between R[n] and R'[n].
假设在矫正后,根据公式其伸缩系数为Assuming that after correction, the expansion coefficient according to the formula is
考虑该模型的边界条件,假设坐标为x的像素,经过拉伸后,坐标变为0,即R′[0]=R[x],相应的,Considering the boundary conditions of the model, assuming that the pixel whose coordinate is x, after stretching, the coordinate becomes 0, that is, R'[0]=R[x], correspondingly,
由此推断:Infer from this:
若将带入if the bring in
即可看到,最终公式可视为It can be seen that the final formula can be regarded as
其中in
现考虑HPixel≤n≤2HPixel-1段,同样考虑到边界条件,有R′[2HPixel-1]=R[2HPixel-1-x],因此同样根据上述相同的方法可计算得计算R[n]和R′[n]间的关系,并将其写为Now consider the section H Pixel ≤n≤2H Pixel -1, and also consider the boundary conditions, there is R'[2H Pixel -1]=R[2H Pixel -1-x], so it can be calculated according to the same method as above. the relationship between R[n] and R'[n], and write it as
的形式。在半像素情况中,也使用相同的方式进行归纳,最终都可以写为相同的表达 form. In the half-pixel case, the same way of induction is also used, and in the end both can be written as the same expression
在将其抽象为统一的计算公式后,可看到复杂的情形均可抽象为统一的处理方式,同时根据R′[n[的表达式,在计算中只与两相邻数据Rpindex(n)]和R[index(n)+1]有关,这意味着该计算只需要少量存储资源来存储临近的数据,无需存储整个图像进行计算,保障了算法良好的实时处理性能。在计算中,将多个像素的计算同时进行,充分利用FPGA的并行性,提高处理效率。After abstracting it into a unified calculation formula, it can be seen that complex situations can be abstracted into a unified processing method. At the same time, according to the expression of R'[n[, in the calculation, only two adjacent data Rpindex(n) ] is related to R[index(n)+1], which means that the calculation only requires a small amount of storage resources to store adjacent data, and does not need to store the entire image for calculation, which ensures good real-time processing performance of the algorithm. In the calculation, the calculation of multiple pixels is carried out at the same time, making full use of the parallelism of the FPGA and improving the processing efficiency.
为了进一步提高算法的处理性能,提高该算法运行时的最高时钟频率,使用如图1所示的流水线方式,将计算中的复杂运算分解至多步进行,这将有效避免高时钟评率造成的时序紧张问题。首先计算index(n),第二个时钟周期后计算a,在第三个时钟周期完成R[index(n)]和R[index(n)+1]In order to further improve the processing performance of the algorithm and increase the maximum clock frequency when the algorithm is running, the pipeline method shown in Figure 1 is used to decompose the complex operations in the calculation into multiple steps, which will effectively avoid the timing caused by the high clock evaluation rate. tension issues. Calculate index(n) first, calculate a after the second clock cycle, and complete R[index(n)] and R[index(n)+1] in the third clock cycle
和对应系数的相乘,第四个时钟周期时完成R[index(n)]×a和R[index(n)+1×(2HPixel-a)的加法,第五个时钟周期将以上计算结果通过移位来完成对2HPixel的除法计算。Multiplying the corresponding coefficient, the addition of R[index(n)]×a and R[index(n)+1×(2HPixel-a) is completed in the fourth clock cycle, and the fifth clock cycle will use the above calculation result The division calculation of the 2H Pixel is done by shifting.
总的来说,本发明实施例在将其抽象为统一的计算公式后,可看到复杂的情形均可抽象为统一的处理方式,同时该计算只需要少量存储资源来存储临近的数据,无需存储整个图像进行计算,保障了算法良好的实时处理性能。在计算中,将多个像素的计算同时进行,充分利用FPGA的并行性,提高处理效率。In general, after abstracting it into a unified calculation formula in the embodiment of the present invention, it can be seen that complex situations can be abstracted into a unified processing method, and the calculation only requires a small amount of storage resources to store adjacent data, without the need for The whole image is stored for calculation, which ensures the good real-time processing performance of the algorithm. In the calculation, the calculation of multiple pixels is carried out at the same time, making full use of the parallelism of the FPGA and improving the processing efficiency.
为了进一步提高算法的处理性能,提高该算法运行时的最高时钟频率,使用流水线方式,将计算中的复杂运算分解至多步进行,这将有效避免高时钟评率造成的时序紧张问题。In order to further improve the processing performance of the algorithm and increase the maximum clock frequency when the algorithm is running, the pipeline method is used to decompose the complex operations in the calculation into multiple steps, which will effectively avoid the timing tightness caused by the high clock evaluation rate.
综上所述,本发明的技术特点如下:To sum up, the technical features of the present invention are as follows:
本发明实施例的一种基于FPGA的色差矫正算法,对不同的色散场景使用统一的方式进行计算,采用实时图像处理方式,特点如下:An FPGA-based chromatic aberration correction algorithm according to the embodiment of the present invention uses a unified method to calculate different chromatic dispersion scenes, and adopts a real-time image processing method, and the characteristics are as follows:
1、偏移后的图像使用 方式进行计算。1. Use the offset image way to calculate.
2、采用流水线和并行处理方式,将复杂运算拆解为多步流水线进行,提高模块处理效率。2. Using pipeline and parallel processing methods, disassemble complex operations into multi-step pipelines to improve module processing efficiency.
3、可应对复杂的色散场景,支持半像素和整数像素的色散校正。3. It can cope with complex dispersion scenes, and supports half-pixel and integer-pixel dispersion correction.
4、所需计算资源少,无需较大存储资源将整个图像存储后进行处理。4. Less computing resources are required, and the entire image is stored and processed without large storage resources.
又一方面,本发明还公开一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如上述方法的步骤。In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the steps of the above method.
再一方面,本发明还公开一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上方法的步骤。In another aspect, the present invention also discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to execute the steps of the above method.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一基于FPGA的色散矫正方法。In yet another embodiment provided by the present application, a computer program product including instructions is also provided, which, when running on a computer, enables the computer to execute any of the FPGA-based dispersion correction methods in the foregoing embodiments.
可理解的是,本发明实施例提供的系统与本发明实施例提供的方法相对应,相关内容的解释、举例和有益效果可以参考上述方法中的相应部分。It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and reference may be made to the corresponding part of the above-mentioned method for the explanation, examples and beneficial effects of the related content.
本申请实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信,Embodiments of the present application further provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus,
存储器,用于存放计算机程序;memory for storing computer programs;
处理器,用于执行存储器上所存放的程序时,实现上述基于FPGA的色散矫正方法,所述方法包括:The processor is used to implement the above-mentioned FPGA-based dispersion correction method when executing the program stored in the memory, and the method includes:
接收图像数据流,并使用片内RAM存储相邻的4个时钟周期的数据;Receive the image data stream, and use the on-chip RAM to store the data of the adjacent 4 clock cycles;
根据校正前后的边界偏移量选择校正方式;Select the correction method according to the boundary offset before and after correction;
对每行数据以中心进行分段处理;Segment each row of data by center;
使用统一数学模型进行色散校正处理;Dispersion correction processing using unified mathematical model;
实时输出校正后的图像。The corrected image is output in real time.
上述电子设备提到的通信总线可以是外设部件互连标准(英文:PeripheralComponent Interconnect,简称:PCI)总线或扩展工业标准结构(英文:Extended IndustryStandard Architecture,简称:EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (English: Peripheral Component Interconnect, abbreviated: PCI) bus or an Extended Industry Standard Architecture (English: Extended Industry Standard Architecture, abbreviated: EISA) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like.
通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above electronic device and other devices.
存储器可以包括随机存取存储器(英文:Random Access Memory,简称:RAM),也可以包括非易失性存储器(英文:Non-Volatile Memory,简称:NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (English: Random Access Memory, short: RAM), or may include non-volatile memory (English: Non-Volatile Memory, short: NVM), for example, at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(英文:Central ProcessingUnit,简称:CPU)、网络处理器(英文:Network Processor,简称:NP)等;还可以是数字信号处理器(英文:Digital Signal Processing,简称:DSP)、专用集成电路(英文:ApplicationSpecific Integrated Circuit,简称:ASIC)、现场可编程门阵列(英文:Field-Programmable Gate Array,简称:FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor may be a general-purpose processor, including a central processing unit (English: Central Processing Unit, referred to as: CPU), a network processor (English: Network Processor, referred to as: NP), etc.; or a digital signal processor (English: Digital Signal Processing, referred to as: DSP), application specific integrated circuit (English: ApplicationSpecific Integrated Circuit, referred to as: ASIC), Field Programmable Gate Array (English: Field-Programmable Gate Array, referred to as: FPGA) or other programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), among others.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the partial description of the method embodiment.
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210142266.4A CN114581380B (en) | 2022-02-16 | 2022-02-16 | FPGA-based dispersion correction method and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210142266.4A CN114581380B (en) | 2022-02-16 | 2022-02-16 | FPGA-based dispersion correction method and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114581380A true CN114581380A (en) | 2022-06-03 |
CN114581380B CN114581380B (en) | 2024-08-20 |
Family
ID=81770625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210142266.4A Active CN114581380B (en) | 2022-02-16 | 2022-02-16 | FPGA-based dispersion correction method and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114581380B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119012021A (en) * | 2024-10-22 | 2024-11-22 | 合肥埃科光电科技股份有限公司 | Chromatic dispersion correction method, system and multi-line true color camera |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1967185A (en) * | 2005-11-15 | 2007-05-23 | 奥林巴斯株式会社 | Lens evaluation device |
JP2008060829A (en) * | 2006-08-30 | 2008-03-13 | Hitachi Omron Terminal Solutions Corp | Image processing apparatus, program, reading system, and image processing method |
CN101166235A (en) * | 2006-10-16 | 2008-04-23 | 索尼株式会社 | Lens apparatus, image capture apparatus, and method for correcting image quality |
JP2010278950A (en) * | 2009-06-01 | 2010-12-09 | Panasonic Corp | Image pickup apparatus with chromatic aberration correction function, chromatic aberration correction method, program, and integrated circuit |
US20110043657A1 (en) * | 2009-07-21 | 2011-02-24 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, program, and storage medium for correcting chromatic aberration |
CN102413336A (en) * | 2010-09-21 | 2012-04-11 | 索尼公司 | Aberration correction apparatus, aberration correction method, and program |
CN102685511A (en) * | 2011-02-21 | 2012-09-19 | 佳能株式会社 | Image processing apparatus and image processing method |
CN102970459A (en) * | 2011-08-31 | 2013-03-13 | 佳能株式会社 | Image processing apparatus, image capture apparatus, and image processing method |
US20150054983A1 (en) * | 2013-08-22 | 2015-02-26 | Canon Kabushiki Kaisha | Image processing apparatus that is capable of correcting color shift, method of controlling the same, and storage medium |
CN104519329A (en) * | 2013-10-08 | 2015-04-15 | 佳能株式会社 | Image processing apparatus, image pickup apparatus, image pickup system and image processing method |
CN105894473A (en) * | 2016-04-20 | 2016-08-24 | 北京小鸟看看科技有限公司 | FPGA-based image rectification method and apparatus |
CN107666562A (en) * | 2016-07-28 | 2018-02-06 | 佳能株式会社 | Image processing apparatus, image processing method and storage medium |
US20180167569A1 (en) * | 2015-08-26 | 2018-06-14 | Olympus Corporation | Image pickup apparatus, image pickup method, and recording medium having recorded image pickup program |
JP2018195876A (en) * | 2017-05-12 | 2018-12-06 | キヤノン株式会社 | Image processing system, imaging apparatus, image processing method and program |
CN111242863A (en) * | 2020-01-09 | 2020-06-05 | 上海酷芯微电子有限公司 | Method and medium for eliminating lens lateral chromatic aberration based on image processor |
US20210321065A1 (en) * | 2020-04-14 | 2021-10-14 | Apple Inc. | Circuit for correcting lateral chromatic abberation |
-
2022
- 2022-02-16 CN CN202210142266.4A patent/CN114581380B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1967185A (en) * | 2005-11-15 | 2007-05-23 | 奥林巴斯株式会社 | Lens evaluation device |
JP2008060829A (en) * | 2006-08-30 | 2008-03-13 | Hitachi Omron Terminal Solutions Corp | Image processing apparatus, program, reading system, and image processing method |
CN101166235A (en) * | 2006-10-16 | 2008-04-23 | 索尼株式会社 | Lens apparatus, image capture apparatus, and method for correcting image quality |
JP2010278950A (en) * | 2009-06-01 | 2010-12-09 | Panasonic Corp | Image pickup apparatus with chromatic aberration correction function, chromatic aberration correction method, program, and integrated circuit |
US20110043657A1 (en) * | 2009-07-21 | 2011-02-24 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, program, and storage medium for correcting chromatic aberration |
CN102413336A (en) * | 2010-09-21 | 2012-04-11 | 索尼公司 | Aberration correction apparatus, aberration correction method, and program |
CN102685511A (en) * | 2011-02-21 | 2012-09-19 | 佳能株式会社 | Image processing apparatus and image processing method |
CN102970459A (en) * | 2011-08-31 | 2013-03-13 | 佳能株式会社 | Image processing apparatus, image capture apparatus, and image processing method |
US20150054983A1 (en) * | 2013-08-22 | 2015-02-26 | Canon Kabushiki Kaisha | Image processing apparatus that is capable of correcting color shift, method of controlling the same, and storage medium |
CN104519329A (en) * | 2013-10-08 | 2015-04-15 | 佳能株式会社 | Image processing apparatus, image pickup apparatus, image pickup system and image processing method |
US20180167569A1 (en) * | 2015-08-26 | 2018-06-14 | Olympus Corporation | Image pickup apparatus, image pickup method, and recording medium having recorded image pickup program |
CN105894473A (en) * | 2016-04-20 | 2016-08-24 | 北京小鸟看看科技有限公司 | FPGA-based image rectification method and apparatus |
CN107666562A (en) * | 2016-07-28 | 2018-02-06 | 佳能株式会社 | Image processing apparatus, image processing method and storage medium |
JP2018195876A (en) * | 2017-05-12 | 2018-12-06 | キヤノン株式会社 | Image processing system, imaging apparatus, image processing method and program |
CN111242863A (en) * | 2020-01-09 | 2020-06-05 | 上海酷芯微电子有限公司 | Method and medium for eliminating lens lateral chromatic aberration based on image processor |
US20210321065A1 (en) * | 2020-04-14 | 2021-10-14 | Apple Inc. | Circuit for correcting lateral chromatic abberation |
Non-Patent Citations (3)
Title |
---|
HARMENING, WM等: "Measurement and correction of transverse chromatic offsets for multi-wavelength retinal microscopy in the living eye", BIOMEDICAL OPTICS EXPRESS, vol. 3, no. 9, 1 September 2012 (2012-09-01), pages 2066 - 2077 * |
李威, 王建萍, 郁道银: "基于FPGA实现医用电子内窥镜畸变图象实时校正的研究", 实用测试技术, no. 01, 28 February 2001 (2001-02-28), pages 1 - 2 * |
耿学文: "计算光谱成像联合色差矫正及超分辨技术研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, vol. 2018, no. 4, 15 April 2018 (2018-04-15), pages 138 - 2838 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119012021A (en) * | 2024-10-22 | 2024-11-22 | 合肥埃科光电科技股份有限公司 | Chromatic dispersion correction method, system and multi-line true color camera |
Also Published As
Publication number | Publication date |
---|---|
CN114581380B (en) | 2024-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11249721B2 (en) | Multiplication circuit, system on chip, and electronic device | |
US20200372609A1 (en) | Super-resolution video reconstruction method, device, apparatus and computer-readable storage medium | |
WO2013087003A1 (en) | Nonlocality-based super-resolution reconstruction method and device | |
CN113630601B (en) | An affine motion estimation method, device, equipment and storage medium | |
CN114170091B (en) | Image scaling method, device, electronic device and storage medium | |
WO2023070862A1 (en) | Method and apparatus for correcting image distortion of wide-angle lens, and photographing device | |
WO2023010750A1 (en) | Image color mapping method and apparatus, electronic device, and storage medium | |
WO2023160426A1 (en) | Video frame interpolation method and apparatus, training method and apparatus, and electronic device | |
CN114581380A (en) | Dispersion correction method based on FPGA and storage medium | |
CN111757180A (en) | Video display control device, video display system, video display method and device | |
US20150242996A1 (en) | Image processing apparatus and image processing method | |
Xu et al. | Image Demoireing in RAW and sRGB Domains | |
US8412003B2 (en) | Image processing methods, apparatus and computer program products using interdependent pixel interpolation operations | |
WO2019114044A1 (en) | Image processing method and device, electronic apparatus, and computer readable storage medium | |
WO2023010755A1 (en) | Hdr video conversion method and apparatus, and device and computer storage medium | |
CN119052481A (en) | Pixel sampling device, method and image compression system | |
CN115511754B (en) | Low-light image enhancement method based on improved Zero-DCE network | |
CN106548448B (en) | Image processing method and device | |
CN115034351B (en) | Data processing method, convolutional neural network training method and device and FPGA | |
CN116389743A (en) | Image encoding method, image encoding device, chip, terminal, storage medium, and program product | |
CN115209030B (en) | Video anti-shake processing method and device, electronic equipment and storage medium | |
CN115190263A (en) | A video scaling method, device, device and storage medium | |
CN118536554B (en) | A reasoning method, system, device and storage medium for a diffusion transformer model based on a window attention layer | |
CN118573800B (en) | A video transmission display method, device and system based on super-resolution super-frame algorithm | |
CN114328289B (en) | Chip structure and its size transformation accelerator |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 230000, 3F, Building J2, Phase II, Zhong'an Chuanggu Science and Technology Park, Wangjiang West Road, High tech Zone, Hefei City, Anhui Province Patentee after: Hefei Eko Photoelectric Technology Co.,Ltd. Country or region after: China Address before: 230000 Building 1, yizhi science and Technology Industrial Park, 388 Yanzihe Road, high tech Zone, Hefei City, Anhui Province Patentee before: Hefei Eko Photoelectric Technology Co.,Ltd. Country or region before: China |