CN101848343B - Image sensor with integral image output - Google Patents
Image sensor with integral image output Download PDFInfo
- Publication number
- CN101848343B CN101848343B CN200910128248.5A CN200910128248A CN101848343B CN 101848343 B CN101848343 B CN 101848343B CN 200910128248 A CN200910128248 A CN 200910128248A CN 101848343 B CN101848343 B CN 101848343B
- Authority
- CN
- China
- Prior art keywords
- pixel
- line
- integral
- image
- value
- 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.)
- Expired - Fee Related
Links
- 238000009825 accumulation Methods 0.000 claims description 51
- 238000007781 pre-processing Methods 0.000 claims description 30
- 230000010354 integration Effects 0.000 claims description 21
- 230000001186 cumulative effect Effects 0.000 claims description 20
- 238000012937 correction Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 19
- 238000000034 method Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种图像感测器,且特别涉及一种具有积分图像输出的图像感测器。The present invention relates to an image sensor, and more particularly to an image sensor with integrated image output.
背景技术 Background technique
愈来愈多的图像识别(Image recognition)技术应用在小型的嵌入式系统上,例如数字相机中的脸部检测(Face detection)功能。这样的嵌入式系统除了图像感测器之外,还搭配一个高速的嵌入式处理器,用以对图像感测器所提取的图像进行处理,而识别出图像特征。近年来,类哈尔(Haar-like)图像特征广泛用于图像识别领域,尤其是脸部检测。使用类哈尔图像特征并结合适应性增益(Adaptive Boost,AdaBoost)演算法,即能够粗略但快速地将图像划分为两个群组,而经由反复地执行此分类处理程序,则可将图像快速划分为多个图像丛集(image cluster),达到图像识别的目的。More and more image recognition (Image recognition) technologies are applied to small embedded systems, such as the face detection (Face detection) function in digital cameras. In addition to the image sensor, such an embedded system is equipped with a high-speed embedded processor for processing the image extracted by the image sensor to recognize image features. In recent years, Haar-like image features have been widely used in the field of image recognition, especially face detection. Using Haar-like image features combined with adaptive gain (Adaptive Boost, AdaBoost) algorithm, the image can be roughly but quickly divided into two groups, and through repeated execution of this classification process, the image can be quickly divided into two groups. It is divided into multiple image clusters to achieve the purpose of image recognition.
AdaBoost演算法为目前最常用的一种分类器融合(Classifier Fusion)方法,其可将多个弱势的分类器(weak classifier)合并为一个强健的分类器(strong classifier)。详细地说,AdaBoost演算法是针对原始图像集中的每一笔数据给予一个权重,并依据其所建立的子分类器的分类结果更新数据的权重,再依权重产生下一次建立子分类器所需的数据。因新的子分类器主要是针对前个分类器不足(分类错误)的部分做补强,故将前一次分类错误的数据权重加重;反之,将分类正确的数据权重降低。即依此重新建立新的子分类器。其详细步骤如下:The AdaBoost algorithm is currently the most commonly used classifier fusion (Classifier Fusion) method, which can combine multiple weak classifiers (weak classifiers) into a strong classifier (strong classifier). In detail, the AdaBoost algorithm is to give a weight to each piece of data in the original image set, and update the weight of the data according to the classification results of the sub-classifier established by it, and then generate the next sub-classifier according to the weight. The data. Because the new sub-classifier is mainly aimed at reinforcing the insufficient (misclassified) part of the previous classifier, the weight of the data that was wrongly classified in the previous time is increased; otherwise, the weight of the data that is correctly classified is reduced. That is, a new sub-classifier is re-established accordingly. The detailed steps are as follows:
假设Dt(i)为第t次迭代(iteration)后的数据重要性分布,i指第i个数据。一开始假设各个数据的重要性均等,故Suppose Dt(i) is the data importance distribution after the tth iteration (iteration), and i refers to the i-th data. At the beginning, it is assumed that the importance of each data is equal, so
D1(i)=1/m (1)D 1 (i) = 1/m (1)
其中,m为数据样本数。Among them, m is the number of data samples.
假设h为子分类器函数,x为数据点,则ht(x)即此子分类器将数据点x归类的结果。此外,假设y为其正确应属的分类结果(+/-1,二分法),其中若分类正确h(x)=y,y*h(x)=+1,则该数据点重要性可降低;若分类错误h(x)≠y,y*h(x)=-1,则该数据点重要性需增加。再者,假设α为修正数据重要性分布所需的权重,Z为正规化(Normalization)因子,利用错误率εt可计算出迭代后的权重α,再利用α与分类是否正确来修正数据重要性分布D(i):Suppose h is a sub-classifier function and x is a data point, then h t (x) is the result of this sub-classifier classifying data point x. In addition, assuming that y is the correct classification result (+/-1, dichotomy), if the classification is correct h(x)=y, y*h(x)=+1, then the importance of the data point can be Decrease; if the classification error h(x)≠y, y*h(x)=-1, then the importance of the data point needs to be increased. Furthermore, assuming that α is the weight required to correct the distribution of data importance, and Z is the normalization factor, the weight α after iteration can be calculated by using the error rate ε t , and then use α and whether the classification is correct to correct the data importance. Sex distribution D(i):
再利用Dt+1(i)来训练新的子分类函数ht+1,经过T次迭代之后,最终的分类器函数为:Then use D t+1 (i) to train a new sub-classification function h t+1 , after T iterations, the final classifier function is:
最后,根据得票数(即分类结果H(x))的多寡,来决定测试数据是属于何种类别。Finally, according to the number of votes (that is, the classification result H(x)), it is determined which category the test data belongs to.
图1(a)~(d)所绘示为已知类哈尔图像特征的示意图。请参照图1(a)~(d),类哈尔图像特征可视为是多个方块组成的群组,例如2个方块(图1(a))、3个方块(图1(b))及4个方块(图1(c)),而其特征值即为这些方块在图像中所涵盖区域的所有像素的像素值总和,白色为+1,黑色为-1。例如三个方块群组中中间白色方块在图像100中所涵盖区域的所有像素的像素值总和扣除左右两块黑色方块在图像100中所涵盖区域的所有像素的像素值总和(如图1(d)),此特征值一般可由积分图像计算而得。Figures 1(a)-(d) are schematic diagrams of known Haar-like image features. Please refer to Figure 1(a)~(d), Haar-like image features can be regarded as a group composed of multiple blocks, such as 2 blocks (Figure 1(a)), 3 blocks (Figure 1(b) ) and 4 squares (Figure 1(c)), and their eigenvalues are the sum of the pixel values of all pixels in the area covered by these squares in the image, white is +1, and black is -1. For example, the sum of the pixel values of all pixels in the area covered by the middle white square in the image 100 in the three square groups is subtracted from the sum of the pixel values of all the pixels in the area covered by the left and right black squares in the image 100 (as shown in Figure 1(d) )), this eigenvalue can generally be calculated from the integral image.
举例来说,图2(a)及图2(b)所绘示为已知特征值计算方法的示意图。请先参照图2(a),图像200中像素P(x2,y2)的积分值即为左上角像素O(x1,y1)至像素P(x2,y2)所围成的方块内所有像素的像素值的总和。接着,请参照图2(b),方块ABCD的特征值则为A-B-C+D,其中,A为像素O至像素A所围成的方块的特征值、B为像素O至像素B所围成的方块的特征值、C为像素O至像素C所围成的方块的特征值、D为像素O至像素D所围成的方块的特征值。For example, FIG. 2( a ) and FIG. 2( b ) are schematic diagrams of known eigenvalue calculation methods. Please refer to Figure 2(a) first, the integral value of pixel P(x 2 , y 2 ) in
由上述可知,在识别图像特征时必需仰赖高速的处理器进行积分图像的运算,而后运用此积分图像进行特征值计算以及执行图像识别、脸部检测等功能。繁琐的运算过程将需要大量消耗处理器的运算效能,例如,对于数字相机中需要同时支持处理多项功能的嵌入式处理器来说,势必造成极大的负担。From the above, it can be known that when recognizing image features, it is necessary to rely on a high-speed processor to perform integral image calculations, and then use this integral image to calculate feature values and perform functions such as image recognition and face detection. The cumbersome calculation process will consume a lot of computing performance of the processor. For example, for an embedded processor in a digital camera that needs to support multiple functions at the same time, it will inevitably cause a huge burden.
发明内容 Contents of the invention
有鉴于此,本发明提供一种具有积分图像输出的图像感测器,可提供积分图像的输出格式。In view of this, the present invention provides an image sensor with integral image output, which can provide an output format of integral image.
本发明提出一种具有积分图像输出的图像感测器,其包括像素电路、线累加器及体累加器。其中,像素电路中包括多个像素元件,而用以提取图像中多个像素的像素值。线累加器耦接于像素电路,而用以累加图像的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值。体累加器耦接于线累加器,而用以将线累加器输出的线像素累加值累加至目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为目标像素的像素积分值,并输出目标像素的像素积分值。The present invention proposes an image sensor with integrated image output, which includes a pixel circuit, a line accumulator, and a volume accumulator. Wherein, the pixel circuit includes a plurality of pixel elements for extracting pixel values of a plurality of pixels in the image. The line accumulator is coupled to the pixel circuit and is used for accumulating pixel values from the first pixel to the target pixel in the target pixel line of the image to obtain the line pixel accumulation value. The volume accumulator is coupled to the line accumulator, and is used for accumulating the line pixel accumulation value output by the line accumulator to the pixel integration value of the pixel corresponding to the target pixel in the previous pixel line of the target pixel line as the pixel of the target pixel Integral value, and output the pixel integral value of the target pixel.
本发明提出一种具有积分图像输出的图像感测器,其包括像素电路、线累加器及N个体累加器。其中,像素电路中包括多个像素元件,而用以提取图像中多个像素的像素值,像素电路可分割为MxN个方形区域,其中M、N为正整数。线累加器耦接于像素电路,而用以累加图像各个方形区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值。N个体累加器则耦接于线累加器,用以分别将线累加器输出的线像素累加值累加至各个方形区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为目标像素的像素积分值,并输出目标像素的像素积分值。The present invention proposes an image sensor with integrated image output, which includes pixel circuits, line accumulators and N individual accumulators. Wherein, the pixel circuit includes a plurality of pixel elements for extracting the pixel values of the plurality of pixels in the image, and the pixel circuit can be divided into MxN square areas, wherein M and N are positive integers. The line accumulator is coupled to the pixel circuit, and is used for accumulating pixel values from the first pixel to the target pixel in the target pixel line of each square area of the image to obtain the line pixel accumulation value. N individual accumulators are coupled to the line accumulators, and are used to respectively accumulate the line pixel accumulation values output by the line accumulators to the pixel integral value of the pixel corresponding to the target pixel in the previous pixel line of the target pixel line in each square area Take as the pixel integral value of the target pixel, and output the pixel integral value of the target pixel.
本发明提出一种具有积分图像输出的图像感测器,其包括像素电路、线累加器及体累加器。其中,像素电路包括多个像素元件,而用以提取图像中多个像素的像素值,其中像素电路可分割为MxN个方形区域,其中M、N为正整数。线累加器耦接像素电路,用以累加图像各个方形区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值。体累加器则耦接于线累加器,用以将线累加器输出的线像素累加值累加至各个方形区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为目标像素的像素积分值,并输出目标像素的像素积分值。The present invention proposes an image sensor with integrated image output, which includes a pixel circuit, a line accumulator, and a volume accumulator. Wherein, the pixel circuit includes multiple pixel elements for extracting pixel values of multiple pixels in the image, wherein the pixel circuit can be divided into MxN square areas, where M and N are positive integers. The line accumulator is coupled to the pixel circuit and is used for accumulating pixel values from the first pixel to the target pixel in the target pixel line in each square region of the image to obtain line pixel accumulation values. The volume accumulator is coupled to the line accumulator, and is used to accumulate the line pixel accumulation value output by the line accumulator to the pixel integral value of the pixel corresponding to the target pixel in the previous pixel line of the target pixel line in each square area as The pixel integration value of the target pixel, and output the pixel integration value of the target pixel.
本发明提出一种具有积分图像输出的图像感测器,其包括像素电路、线累加器及体累加器。其中,像素电路包括多个像素元件,而用以提取图像中多个像素的像素值,其中像素电路可分割为多个方形区域,分割区域不限定为等大小。线累加器耦接像素电路,用以累加图像各个方形区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值。体累加器则耦接于线累加器,用以将线累加器输出的线像素累加值累加至各个方形区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为目标像素的像素积分值,并输出目标像素的像素积分值。其中,线累加器包括在跨越上述方形区域的纵向边界或横向边界时重设,而体累加器则包括在跨越上述方形区域的横向边界时重设。The present invention proposes an image sensor with integrated image output, which includes a pixel circuit, a line accumulator, and a volume accumulator. Wherein, the pixel circuit includes multiple pixel elements for extracting pixel values of multiple pixels in the image, wherein the pixel circuit can be divided into multiple square areas, and the divided areas are not limited to equal sizes. The line accumulator is coupled to the pixel circuit and is used for accumulating pixel values from the first pixel to the target pixel in the target pixel line in each square region of the image to obtain line pixel accumulation values. The volume accumulator is coupled to the line accumulator, and is used to accumulate the line pixel accumulation value output by the line accumulator to the pixel integral value of the pixel corresponding to the target pixel in the previous pixel line of the target pixel line in each square area as The pixel integration value of the target pixel, and output the pixel integration value of the target pixel. Wherein, the line accumulator includes resetting when crossing the longitudinal boundary or the lateral boundary of the above-mentioned square area, and the volume accumulator includes resetting when crossing the lateral boundary of the above-mentioned square area.
基于上述,本发明的具有积分图像输出的图像感测器通过在图像感测器中增加一组积分电路,而可针对图像感测器所接收到的像素值逐条像素线地进行累加动作,并将累加后的积分图像输出给后端处理器运用。据此,可减轻处理器运算积分图像上的负担。Based on the above, the image sensor with integrated image output of the present invention adds a group of integration circuits in the image sensor, and can perform an accumulation operation pixel by pixel line for the pixel values received by the image sensor, and Output the accumulated integral image to the back-end processor for use. Accordingly, the load on the processor to calculate the integral image can be reduced.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.
附图说明 Description of drawings
图1(a)~(d)所绘示为已知类哈尔图像特征的示意图。Figures 1(a)-(d) are schematic diagrams of known Haar-like image features.
图2(a)及图2(b)所绘示为已知特征值计算方法的示意图。FIG. 2( a ) and FIG. 2( b ) are schematic diagrams of known eigenvalue calculation methods.
图3是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。FIG. 3 is a block diagram of an image sensor with integrated image output according to an embodiment of the invention.
图4(a)及图4(b)是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 4( a ) and FIG. 4( b ) are examples of calculated integral images according to an embodiment of the present invention.
图5(a)及图5(b)是依照本发明一实施例所绘示的计算特征值的范例。FIG. 5( a ) and FIG. 5( b ) are examples of calculating feature values according to an embodiment of the present invention.
图6是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。FIG. 6 is a block diagram of an image sensor with integrated image output according to an embodiment of the invention.
图7是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。FIG. 7 is a block diagram of an image sensor with integrated image output according to an embodiment of the invention.
图8是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 8 is an example of calculating integral images according to an embodiment of the present invention.
图9A是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。FIG. 9A is a block diagram of an image sensor with integrated image output according to an embodiment of the invention.
图9B是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。FIG. 9B is a block diagram of an image sensor with integrated image output according to an embodiment of the invention.
图10是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 10 is an example of calculating integral images according to an embodiment of the present invention.
图11(a)及图11(b)是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 11( a ) and FIG. 11( b ) are examples of calculated integral images according to an embodiment of the present invention.
图12(a)及图12(b)是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 12( a ) and FIG. 12( b ) are examples of calculated integral images according to an embodiment of the present invention.
图13(a)及图13(b)是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 13( a ) and FIG. 13( b ) are examples of calculated integral images according to an embodiment of the present invention.
图14是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 14 is an example of calculating integral images according to an embodiment of the present invention.
图15是依照本发明一实施例所绘示的计算积分图像的范例。FIG. 15 is an example of calculating integral images according to an embodiment of the present invention.
图16是依照本发明一实施例所绘示的线累加器数值随时间变化的示意图。FIG. 16 is a schematic diagram showing the change of the value of the line accumulator with time according to an embodiment of the present invention.
图17则是依照本发明一实施例所绘示的体累加器数值随时间变化的示意图。FIG. 17 is a schematic diagram illustrating changes in volume accumulator values over time according to an embodiment of the present invention.
【主要元件符号说明】[Description of main component symbols]
100、200、800、1000、1210、1310、1400、1500:图像100, 200, 800, 1000, 1210, 1310, 1400, 1500: Image
310、610、710、910:像素电路310, 610, 710, 910: pixel circuit
320、630、730、810、930、1010:线累加器320, 630, 730, 810, 930, 1010: line accumulator
322、632、732、932:第一加法器322, 632, 732, 932: first adder
324、634、734、934:第一缓冲器324, 634, 734, 934: first buffer
330、640、940、1020:体累加器330, 640, 940, 1020: volume accumulator
332、642、742、942:第二加法器332, 642, 742, 942: second adder
334、644、744、944:第二缓冲器334, 644, 744, 944: Second buffer
510、1221、1225:右下角像素510, 1221, 1225: bottom right pixel
520、1222、1226:左下角像素520, 1222, 1226: bottom left pixel
530、1223:右上角像素530, 1223: upper right pixel
540、1224:左上角像素540, 1224: upper left pixel
620、720、920:前处理单元620, 720, 920: pre-processing unit
650:多工器650: multiplexer
740、820:第一体累加器740, 820: first body accumulator
750、830:第二体累加器750, 830: second volume accumulator
752:第三加法器752: Third Adder
754:第三缓冲器754: Third buffer
760:多工器760: multiplexer
936:第一多工器936: The first multiplexer
946:第二多工器946: second multiplexer
950:第三多工器950: third multiplexer
1110、1220、1320:子积分图像1110, 1220, 1320: sub-integral images
1120:还原后积分图像1120: Integral image after restoration
具体实施方式 Detailed ways
图像感测器中包含了上百万像素,其设计上则采用以逐条像素线传输的图场(field)整合读取系统。其中,图像感测器的色彩滤波器包括RGB色彩空间等以线交错方式排列的彩色像素电路。图像感测器的输出端口则提供多种输出格式以因应后端装置不同的应用需求,例如RGB、YCrCb、YUV等格式。本发明即通过在图像感测器中增加一个积分电路,用以计算图像感测器所提取图像的积分图像,而可提供一种新的积分图像输出格式给后端的处理器作为脸部检测的参考之用。The image sensor contains millions of pixels, and its design adopts a field-integrated reading system that transmits pixel-by-pixel line. Wherein, the color filter of the image sensor includes color pixel circuits arranged in a line-staggered manner in RGB color space. The output port of the image sensor provides a variety of output formats, such as RGB, YCrCb, YUV, etc., to meet different application requirements of back-end devices. The present invention adds an integral circuit in the image sensor to calculate the integral image of the image extracted by the image sensor, and can provide a new integral image output format to the back-end processor as a face detection For reference purposes.
详细地说,ADABOOST演算法通常是以软件来实现,而难以由硬件来实现,这是因为此演算法相当复杂,且需要庞大的电路来处理数据。据此,本发明直接在图像感测器中配置一个简单的累加器电路来计算积分数据,并将所计算的数据输出作为积分图像。而基于此积分数据,后端的处理器仅需做简单的加减计算即可获得目标区域内所有像素的累加像素值,并用以执行脸部检测,可加速特征比对的进行。为了使本发明的内容更为明了,以下则分别就计算单一图像或分割图像的积分图像的情况,各举实施例说明本发明具有积分图像输出的图像感测器的详细实施方式。In detail, the ADABOOST algorithm is usually implemented by software, but it is difficult to implement by hardware, because the algorithm is quite complicated and requires a huge circuit to process data. Accordingly, the present invention directly configures a simple accumulator circuit in the image sensor to calculate integral data, and outputs the calculated data as an integral image. Based on this integral data, the back-end processor only needs to do simple addition and subtraction calculations to obtain the accumulated pixel values of all pixels in the target area, and use it to perform face detection, which can speed up feature comparison. In order to make the content of the present invention more clear, the following describes the detailed implementation of the image sensor with integral image output according to the present invention with regard to the cases of calculating integral images of a single image or divided images respectively.
图3是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。请参照图3,本实施例的图像感测器包括像素电路310、线累加器320及体累加器330,其功能分述如下:FIG. 3 is a block diagram of an image sensor with integrated image output according to an embodiment of the invention. Referring to FIG. 3, the image sensor of this embodiment includes a
像素电路310中包括多个像素元件,而用以提取图像中多个像素的像素值。此像素电路310中的像素可以是由电荷耦合元件(Charge CoupledDevice,CCD)或是互补式金属氧化物半导体(Complementary Metal-OxideSemiconductor Device,CMOS)元件所构成,而不限制其范围。此外,这些像素所提取的图像信号可经由模拟数字转换器(Analog-to-DigitalConverter,ADC)转换为数字类型的像素值而输出至后端装置以供后端装置处理运用。值得一提的是,所述的像素电路310除了包含多个像素元件外,亦包含扫描线、数据线、栅极驱动器与源极驱动器等元件,这些元件均为已知像素电路中常用的元件,故其功能在此不再赘述。The
线累加器320耦接在像素电路310之后,用以从像素电路310接收图像中各个像素的像素值,并针对图像中目标像素线中第一像素至目标像素的像素值进行累加动作,而获得线像素累加值。详细地说,线累加器320包括第一加法器322及第一缓冲器324。其中,第一加法器322将其所接收的目标像素的像素值累加至第一缓冲器324所记录的线像素累加值,而第一缓冲器324即用以记录目标像素线中到目标像素为止所累加的线像素累加值,并输出此线像素累加值。其中,第一缓冲器324在第一加法器322每累加完一条像素线中所有像素的像素值后即重设,而由第一加法器322继续累加下一条像素线的像素值,如此逐条像素线的累加,即可实现如线积分的效果。The
体累加器330耦接在线累加器320之后,而用以将线累加器320输出的线像素累加值累加至目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为目标像素的像素积分值。其中,体累加器330所输出图像的像素的像素积分值即形成图像的积分图像。详细地说,体累加器330中包括第二加法器332及第二缓冲器334。其中,第二缓冲器334中记录目标像素线的前一条像素线中各个像素的像素积分值,其容量仅需可容纳一条像素线的像素积分值的数据即可,如果目标像素线为图像的第一条像素线,则其所记录的像素积分值则从零开始累加起。第二加法器332是将线累加器320输出的目标像素线中到目标像素为止的线像素累加值累加至第二缓冲器334所记录的前一条像素线中对应于目标像素的像素的像素积分值,而获得此目标像素的像素积分值。The
值得一提的是,此处所谓前一条像素线中对应于目标像素的像素即是与目标像素为同一行的像素,也就是目标像素上面的那一个像素,待第二加法器332计算出目标像素的像素积分值后,即将其输出,同时也将第二缓冲器334中所记录前一条像素线中对应于目标像素的像素的像素积分值取代为目标像素的像素积分值,以作为下次计算下一条扫描线的像素积分值之用。It is worth mentioning that the so-called pixel corresponding to the target pixel in the previous pixel line is the pixel in the same row as the target pixel, that is, the pixel above the target pixel. After the
此外,本实施例的目标像素的像素积分值是在体累加器330中的第二加法器332计算完成后即直接输出。而在另一实施例中,目标像素的像素积分值也可以是先存储在第二缓冲器334中,再由第二缓冲器334循序输出,或是等待第二缓冲器334记录满一整条目标扫描线中各个像素的像素积分值后,再一次输出,而不限制其范围。In addition, the pixel integral value of the target pixel in this embodiment is directly output after the calculation by the
针对上述图像感测器计算积分图像的过程,以下则举一实例说明。图4(a)及图4(b)是依照本发明一实施例所绘示的计算积分图像的范例。请同时参照图4(a)及图4(b),假设图4(a)为图像感测器所提取的原始图像(Rawimage),而图4(b)则为图4(a)的原始图像的积分图像(Integral image)。其中,图像感测器在计算第4条扫描线的第3个像素的像素积分值时,则先由线累加器累加原始图像中第4条扫描线的第1个像素至第3个像素的像素值(即1、4、0),而获得线像素累加值1+4+0=5。接着再由体累加器将此线像素累加值累加至前一条扫描线(即第3条扫描线)中对应像素(即第3个像素)的像素积分值,而获得目标像素的像素积分值5+14=19。此像素积分值则更新体累加器中所记录的前一条扫描线中对应像素的像素积分值,而作为计算下一条(即第5条扫描线)中对应像素(即第3个像素)的像素积分值之用。Regarding the process of calculating the integrated image by the above image sensor, an example is given below to illustrate. FIG. 4( a ) and FIG. 4( b ) are examples of calculated integral images according to an embodiment of the present invention. Please refer to Figure 4(a) and Figure 4(b) at the same time, assuming that Figure 4(a) is the original image (Rawimage) extracted by the image sensor, and Figure 4(b) is the original image of Figure 4(a) Integral image of the image. Wherein, when the image sensor calculates the pixel integral value of the third pixel of the fourth scan line, the line accumulator first accumulates the pixel values of the first pixel to the third pixel of the fourth scan line in the original image. Pixel values (that is, 1, 4, 0), and the line pixel accumulated
上述范例所计算出的积分图像随即输出至后端处理器,此时后端处理器就只需要再经由简单的加减运算,即可获得所欲求取的图像特征的特征值。图5(a)及图5(b)是依照本发明一实施例所绘示的计算特征值的范例。请同时参照图5(a)及图5(b),假设处理器欲求取原始图像中方块A的特征值,则可分别从积分图像中找出对应于方块A四个角落的边缘像素,即右下角像素510、左下角像素520、右上角像素530及左上角像素540的像素积分值,并进行加减运算,即可得到方块A的特征值0+18-6-6=6。此积分值即为原始图像中方块A所有像素的像素值总和0+2+1+1+1+1=6。The integral image calculated by the above example is then output to the back-end processor. At this time, the back-end processor only needs to perform simple addition and subtraction operations to obtain the desired feature value of the image feature. FIG. 5( a ) and FIG. 5( b ) are examples of calculating feature values according to an embodiment of the present invention. Please refer to Figure 5(a) and Figure 5(b) at the same time, assuming that the processor wants to obtain the eigenvalues of the square A in the original image, the edge pixels corresponding to the four corners of the square A can be found from the integral image respectively, namely The pixel integral values of the lower
通过上述图像感测器的架构,即可在图像感测器提取像素值的第一时间计算出像素积分值,进而输出积分图像的格式,以供后续的处理器运用。值得一提的是,为了提升图像感测器输出图像的弹性,本发明还包括在图像感测器中配置前处理单元及多工器,而可提供多种不同的输出图像格式,以下则再举一实施例详细说明。Through the structure of the above-mentioned image sensor, the integrated value of the pixel can be calculated at the first time when the image sensor extracts the pixel value, and then the format of the integrated image can be output for use by the subsequent processor. It is worth mentioning that, in order to improve the flexibility of the image sensor output image, the present invention also includes configuring a pre-processing unit and a multiplexer in the image sensor, so as to provide a variety of different output image formats, as follows An example will be given in detail.
图6是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。请参照图6,本实施例的图像感测器包括像素电路610、前处理单元620、线累加器630、体累加器640及多工器650,其功能分述如下:FIG. 6 is a block diagram of an image sensor with integrated image output according to an embodiment of the invention. Referring to FIG. 6, the image sensor of this embodiment includes a
像素电路610用以提取图像中多个像素的像素值,而前处理单元620则针对像素电路610所输出的像素的像素值进行空间校正或扭曲校正等前置处理。The
线累加器630包括第一加法器632及第一缓冲器634,其耦接在前处理单元620之后,用以从前处理单元620接收已经过前置处理后的像素的像素值,并针对图像中目标像素线中第一像素至目标像素的像素值进行累加动作,而获得线像素累加值。The
体累加器640包括第二加法器642及第二缓冲器644,其耦接在线累加器630之后,而用以将线累加器630输出的线像素累加值累加至目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为目标像素的像素积分值。The
多工器650则耦接至前处理单元620与体累加器640,其可根据使用者或后端处理器所设定的输出图像格式,选择直接输出图像中各个像素的像素值,或是输出已经过累加后的像素积分值。The
通过上述图像感测器的架构,即可提供多种输出图像的格式供使用者或后端处理器选择,即在选择一般模式时,输出所提取的原始图像,而在选择脸部检测模式时,则输出所提取图像的积分图像,而可提供输出图像选择上的弹性。Through the structure of the above-mentioned image sensor, a variety of output image formats can be provided for the user or the back-end processor to choose, that is, when the general mode is selected, the extracted original image is output, and when the face detection mode is selected , the integral image of the extracted image is output, which can provide flexibility in the selection of the output image.
以上实施例的图像感测器均针对其所提取的单一颜色的图像进行积分运算,而在另一实施例中,图像感测器还可进一步针对图像中不同色彩空间(例如RGB、YCrCb及YUV等色彩空间)的数据进行积分运算,进而获得多个色彩空间的积分图像。详细地说,图像感测器中可针对像素电路所提取的每一个色彩空间的原始图像配置一组线累加器及体累加器,用以计算图像在该色彩空间上的积分图像,并输出给后端处理器运用。其中,线累加器及体累加器运算积分图像的方式与前述实施例相同或相似,故在此不再赘述。The image sensors in the above embodiments all carry out integration operations on the images of a single color extracted by them. and other color spaces) to perform integral operations on the data, and then obtain integral images of multiple color spaces. In detail, a set of line accumulators and volume accumulators can be configured in the image sensor for the original image of each color space extracted by the pixel circuit to calculate the integral image of the image in the color space and output to Backend processor usage. Wherein, the manners of calculating the integrated image by the line accumulator and the volume accumulator are the same as or similar to those of the foregoing embodiments, and thus will not be repeated here.
此外,为了减少图像感测器中线累加器及体累加器的运算量,藉以加快其运算积分图像的速度,本发明还包括将图像分割为多个方形区域,再针对各个方形区域计算其积分图像,并合并为一种新的积分图像格式输出给后端处理器运用。处理器在取得此格式的积分图像后,也仅需进行简单的加减运算,同样可以求得图像中特定方块的特征值,以下则再举一实施例详细说明。In addition, in order to reduce the calculation amount of the line accumulator and the volume accumulator in the image sensor, so as to speed up the calculation speed of the integral image, the present invention also includes dividing the image into multiple square areas, and then calculating the integral image for each square area , and combined into a new integral image format for output to the back-end processor. After the processor obtains the integrated image in this format, it only needs to perform simple addition and subtraction operations to obtain the feature value of a specific block in the image. Another embodiment will be described in detail below.
图7是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。请参照图7,本实施例的图像感测器包括像素电路710、前处理单元720、线累加器730、第一体累加器740、第二体累加器750及多工器760,其功能分述如下:FIG. 7 is a block diagram of an image sensor with integrated image output according to an embodiment of the invention. Please refer to FIG. 7, the image sensor of this embodiment includes a
像素电路710用以提取图像中多个像素的像素值,而前处理单元720则针对像素电路710所输出的像素的像素值进行空间校正或扭曲校正等前置处理。其中,像素电路710可等分为左上区域、右上区域、左下区域及右下区域,而用以提取各个区域的像素的像素值。同理,在另一实施例中,像素电路710也可等分为MxN个方形区域,M、N为正整数,在此不限制其范围。The
线累加器730包括第一加法器732及第一缓冲器734,其耦接在前处理单元720之后,用以从前处理单元720接收已经过前置处理后的像素的像素值,并针对图像中各个区域的目标像素线中第一像素至目标像素的像素值进行累加动作,而获得线像素累加值。The
第一体累加器740包括第二加法器742及第二缓冲器744,其耦接在线累加器730之后,而用以将线累加器730输出的各个区域的线像素累加值累加至相同区域中目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为此区域中目标像素的像素积分值。The
详细地说,线累加器730可先累加图像的左上区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由第一体累加器740将此线像素累加值累加至左上区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为左上区域的目标像素的像素积分值。In detail, the
此外,线累加器730可累加图像的右上区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由第一体累加器740将此线像素累加值累加至右上区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为右上区域的目标像素的像素积分值。据此,第一体累加器740即完成图像的左上区域与右上区域的积分图像的运算。In addition, the
第二体累加器750包括第三加法器752及第三缓冲器754,其耦接在线累加器730之后,而用以将线累加器730输出的各个区域的线像素累加值累加至相同区域中目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为此区域中目标像素的像素积分值。The
详细地说,线累加器730可先累加图像的左下区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由第二体累加器750将此线像素累加值累加至左下区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为左下区域的目标像素的像素积分值。In detail, the
此外,线累加器730可累加图像的右下区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由第二体累加器750将此线像素累加值累加至右下区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为右下区域的目标像素的像素积分值。据此,第二体累加器750即完成图像的左下区域与右下区域的积分图像的运算。In addition, the
多工器760则分别耦接至前处理单元720第一体累加器740和第二体累加器750,其可根据使用者或后端处理器所设定的输出图像格式,选择直接输出图像中各个像素的像素值,或是输出已经过累加后图像的左下区域与右下区域的像素积分值。The
针对上述图像感测器计算积分图像的过程,以下则举一实例说明。图8是依照本发明一实施例所绘示的计算积分图像的范例。请同时参照图8,左方的图像800为图像感测器所提取的原始图像,此图像可等分为2x2个方形区域。其中,图像感测器在计算右上区域的第2条扫描线的第2个像素的像素积分值时,先由线累加器810累加原始图像中第2条扫描线的第5个像素至第6个像素的像素值(即5、0),而获得线像素累加值5+0=5。Regarding the process of calculating the integrated image by the above image sensor, an example is given below to illustrate. FIG. 8 is an example of calculating integral images according to an embodiment of the present invention. Please also refer to FIG. 8 , the
接着再由第一体累加器820将此线像素累加值累加至前一条扫描线(即第1条扫描线)中对应像素(即第6个像素)的像素积分值,而获得目标像素的像素积分值5+1=6。此像素积分值则更新第一体累加器820中所记录的前一条扫描线中对应像素的像素积分值,而作为计算下一条(即第3条扫描线)中对应像素(即第6个像素)的像素积分值之用。Then, the
同理,图像感测器在计算左下区域的第4条扫描线的第4个像素的像素积分值时,则先由线累加器810累加原始图像中第8条扫描线的第1个像素至第4个像素的像素值(即1、4、0、2),而获得线像素累加值1+4+0+2=7。Similarly, when the image sensor calculates the pixel integral value of the fourth pixel of the fourth scan line in the lower left area, the
接着再由第二体累加器830将此线像素累加值累加至前一条扫描线(即第7条扫描线)中对应像素(即第4个像素)的像素积分值,而获得目标像素的像素积分值7+18=25。此像素积分值则更新第二体累加器830中所记录的前一条扫描线中对应像素的像素积分值。Then, the
值得一提的是,上述图像感测器的架构是利用两个体累加器分别对图像中上半部及下半部的像素进行累加动作。然而,在一实施例中,如果于体累加器中再加入一个重置电路,并在体累加器累加完上半部像素的像素积分值之后即重设/重设/重新累加,则可再继续使用同一个体累加器来累加下半部像素的像素积分值,藉此可节省硬件成本。以下则再举一实施例详细说明。It is worth mentioning that the structure of the above image sensor utilizes two volume accumulators to respectively accumulate the pixels in the upper half and the lower half of the image. However, in one embodiment, if a reset circuit is added to the volume accumulator, and reset/reset/re-accumulate after the volume accumulator finishes accumulating the pixel integral values of the upper half of the pixels, then it can be re-accumulated. The hardware cost can be saved by continuing to use the same bulk accumulator to accumulate the integrated pixel value of the lower half of the pixels. Hereinafter, another embodiment will be given in detail.
图9A是依照本发明一实施例所绘示的具有积分图像输出的图像感测器的方块图。请参照图9A,本实施例的图像感测器包括像素电路910、前处理单元920、线累加器930、第一体累加器940及第三多工器950,其功能分述如下:FIG. 9A is a block diagram of an image sensor with integrated image output according to an embodiment of the invention. Referring to FIG. 9A, the image sensor of this embodiment includes a
像素电路910用以提取图像中多个像素的像素值,而前处理单元920则针对像素电路910所输出的像素的像素值进行空间校正或扭曲校正等前置处理。其中,像素电路910可等分为左上区域、右上区域、左下区域及右下区域,而用以提取各个区域的像素的像素值。同理,在另一实施例中,像素电路910也可等分为MxN个方形区域,M、N为正整数,在此不限制其范围。The
线累加器930包括第一加法器932、第一缓冲器934及第一多工器936,其耦接在前处理单元920之后,用以从前处理单元920接收已经过前置处理后的像素的像素值,并针对图像中各个区域的目标像素线中第一像素至目标像素的像素值进行累加动作,而获得线像素累加值。值得注意的是,每当第一加法器932累加完图像各个区域的一条像素线中所有像素的像素值后,即可通过发送信号0至第一多工器936,而由第一多工器936将第一缓冲器934的值重设,而继续使用第一缓冲器934来累加下一条像素线中像素的像素值。The
体累加器940包括第二加法器942、第二缓冲器944及第二多工器946,而用以将线累加器930输出的各个区域的线像素累加值累加至相同区域中目标像素线的前一条像素线中对应于目标像素的像素的像素积分值以作为此区域中目标像素的像素积分值。The
详细地说,线累加器930可先累加图像的左上区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由体累加器940将此线像素累加值累加至左上区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为左上区域的目标像素的像素积分值。In detail, the
此外,线累加器930可重新累加图像的右上区域的同一条目标像素线中该区域第一像素至目标像素的像素值,而获得线像素累加值,而由体累加器940将此线像素累加值累加至右上区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为右上区域的目标像素的像素积分值。据此,体累加器940即完成图像的左上区域与右上区域的积分图像的运算。In addition, the
值得注意的是,当体累加器940累加完左上区域与右上区域的像素的像素积分值之后,即可通过发送信号0至第二多工器946,而由第二多工器946将第二缓冲器944的值重设,而继续使用第二缓冲器944来累加左下区域与右下区域的像素的像素积分值。It is worth noting that after the
当体累加器940重设之后,线累加器930即可累加图像的左下区域的目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由体累加器940将此线像素累加值累加至左下区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为左下区域的目标像素的像素积分值。After the
此外,线累加器930还可重新累加图像的右下区域的同一条目标像素线中第一像素至目标像素的像素值,而获得线像素累加值,而由体累加器940将此线像素累加值累加至右下区域的目标像素线的前一条像素线中对应于目标像素的像素的像素积分值,以作为右下区域的目标像素的像素积分值。据此,体累加器940即完成图像的左下区域与右下区域的积分图像的运算。In addition, the
第三多工器950则分别耦接至前处理单元920及体累加器940,其可根据使用者或后端处理器所设定的输出图像格式,选择直接输出图像中各个像素的像素值,或是输出已经过累加后图像的左下区域与右下区域的像素积分值。The
图9B是依照本发明另一实施例所绘示的具有积分图像输出的图像感测器的方块图。请参照图9B,本实施例的图像感测器包括像素电路910、前处理单元920、线累加器930、第一体累加器940及第三多工器950。与图9A的图像感测器不同的是,本实施例的图像感测器是将第一多工器936配置在第一加法器932及第一缓冲器934之间,以及将第二多工器946配置在第二加法器942及第二缓冲器944之间,藉以达到将第一缓冲器934与第二缓冲器944重设的功效。除此之外,这些元件的功能均与图9A中的元件相同或相似,故在此不再赘述。FIG. 9B is a block diagram of an image sensor with integrated image output according to another embodiment of the present invention. Referring to FIG. 9B , the image sensor of this embodiment includes a
针对上述图像感测器计算积分图像的过程,以下则举一实例说明。图10是依照本发明一实施例所绘示的计算积分图像的范例。请同时参照图10,左方的图像1000为图像感测器所提取的原始图像,此图像可等分为2x2个方形区域。其中,图像感测器在计算右上区域的第2条扫描线的第2个像素的像素积分值时,先由线累加器1010累加原始图像中第1条扫描线的第5个像素至第6个像素的像素值(即5、0),而获得线像素累加值5+0=5。Regarding the process of calculating the integrated image by the above image sensor, an example is given below to illustrate. FIG. 10 is an example of calculating integral images according to an embodiment of the present invention. Please also refer to FIG. 10 , the
接着再由体累加器1020将此线像素累加值累加至前一条扫描线(即第1条扫描线)中对应像素(即第6个像素)的像素积分值,而获得目标像素的像素积分值5+1=6。此像素积分值则更新体累加器1020中所记录的前一条扫描线中对应像素的像素积分值,而作为计算下一条(即第3条扫描线)中对应像素(即第6个像素)的像素积分值之用。Then, the
值得注意的是,图像感测器在计算完右上区域的第4条扫描线的第4个像素的像素积分值之后,即将体累加器1020中累加的像素积分值重设,而可用于累加左下区域的像素积分值。而当图像感测器在计算左下区域的第1条扫描线的第2个像素的像素积分值时,则先由线累加器1010累加原始图像中第5条扫描线的第1个像素至第2个像素的像素值(即0、1),而获得线像素累加值0+1=1。接着再由体累加器1020将此线像素累加值累加至前一条扫描线中对应像素的像素积分值(已重设)或直接载入新值来重新累加,而获得目标像素的像素积分值为1。It is worth noting that after the image sensor has calculated the pixel integral value of the fourth pixel of the fourth scan line in the upper right area, the accumulated pixel integral value in the
同理,图像感测器在计算左下区域的第4条扫描线的第4个像素的像素积分值时,则先由线累加器1010累加原始图像中第8条扫描线的第1个像素至第4个像素的像素值(即1、4、0、2),而获得线像素累加值1+4+0+2=7。Similarly, when the image sensor calculates the pixel integral value of the fourth pixel of the fourth scan line in the lower left area, the
接着再由体累加器1020将此线像素累加值累加至前一条扫描线(即第7条扫描线)中对应像素(即第4个像素)的像素积分值,而获得目标像素的像素积分值7+18=25。此像素积分值则更新体累加器1020中所记录的前一条扫描线中对应像素的像素积分值。Then, the
上述范例所计算出子积分图像即输出至后端处理器,此时后端处理器就只需要再经由简单的加减运算,即可还原出积分图像,并用以求取图像特征的特征值。图11(a)及图11(b)是依照本发明一实施例所绘示的计算积分图像的范例。请同时参照图11(a)及图11(b),其中图11(a)为经由上述图像感测器的计算后所获得的子积分图像1110,而图11(b)则为还原后的积分图像1120。其中,积分图像1120的左上区域与子积分图像1110的左上区域相同,故处理器可直接套用子积分图像1110的左上区域中的像素积分值。然而,如果处理器欲求取积分图像1120的左下区域的第1条扫描线的第2个像素的像素积分值时,则除了需参考左下区域对应位置的像素(即第1条扫描线的第2个像素)的像素积分值之外,还需参考左上区域下缘同一行的像素(即第4条扫描线的第2个像素)的像素积分值,而将两者相加以还原出积分图像1120的目标像素的像素积分值,即1+13=14。The sub-integral image calculated in the above example is output to the back-end processor. At this time, the back-end processor only needs to perform simple addition and subtraction operations to restore the integral image and use it to obtain the feature value of the image feature. FIG. 11( a ) and FIG. 11( b ) are examples of calculated integral images according to an embodiment of the present invention. Please refer to Figure 11(a) and Figure 11(b) at the same time, where Figure 11(a) is the sub-integral image 1110 obtained after the calculation of the above image sensor, and Figure 11(b) is the restored Integral image 1120 . Wherein, the upper left area of the integral image 1120 is the same as the upper left area of the sub-integral image 1110 , so the processor can directly apply the pixel integral value in the upper left area of the sub-integral image 1110 . However, if the processor wants to obtain the pixel integral value of the second pixel of the first scan line in the lower left area of the integral image 1120, in addition to referring to the pixel at the corresponding position in the lower left area (ie, the second pixel of the first scan line In addition to the pixel integral value of the pixel), it is also necessary to refer to the pixel integral value of the same row of pixels (that is, the second pixel of the fourth scan line) in the lower edge of the upper left area, and add the two to restore the integral image 1120 The pixel integral value of the target pixel, that is, 1+13=14.
同理,如果处理器欲求取积分图像1120的右下区域的第3条扫描线的第3个像素的像素积分值时,则除了需参考右下区域对应位置的像素(即第3条扫描线的第3个像素)的像素积分值之外,还需参考左上区域右下角的像素(即第4条扫描线的第4个像素)的像素积分值、右上区域下缘同一行的像素(即第4条扫描线的第3个像素)的像素积分值以及左下区域右缘同一列的像素(即第3条扫描线的第4个像素)的像素积分值,而将三者相加以还原出积分图像1120的目标像素的像素积分值,即14+25+19+18=76。Similarly, if the processor wants to obtain the pixel integral value of the third pixel of the third scan line in the lower right area of the integrated image 1120, in addition to referring to the pixel at the corresponding position in the lower right area (ie, the third scan line In addition to the pixel integral value of the third pixel of the upper left area), it is also necessary to refer to the pixel integral value of the pixel in the lower right corner of the upper left area (that is, the fourth pixel of the fourth scan line), and the pixels in the same line of the lower edge of the upper right area (ie The pixel integral value of the 3rd pixel of the 4th scan line) and the pixel integral value of the pixel of the same column at the right edge of the lower left area (that is, the 4th pixel of the 3rd scan line), and the three are added to restore The pixel integral value of the target pixel of the integrated image 1120 is 14+25+19+18=76.
此外,上述新的积分图像也可用以求得原始积分图像中特定区域的特征值。针对仅涵括单一个分割区域的特定区域的特征值计算,图12(a)及图12(b)是依照本发明一实施例所绘示的计算积分图像的范例。其中,图12(a)为原始图像1210,而图12(b)为经由上述图像感测器的计算后所获得的子积分图像1220。In addition, the above-mentioned new integral image can also be used to obtain the characteristic value of a specific region in the original integral image. For the calculation of feature values of a specific region that only includes a single segmented region, FIG. 12( a ) and FIG. 12( b ) are examples of calculating integral images according to an embodiment of the present invention. Wherein, FIG. 12( a ) is the
由图12(a)可知,原始图像1210的方块A所包含所有像素的像素积分值为0+2+1+1=4。接着,请参照图12(b),如果欲利用子积分图像1220求得原始图像1210中方块A所包含所有像素的像素积分值,则需找出子积分图像1220中的对应方块A’,并以方块A’的右下角像素1221、左下角像素1222、右上角像素1223、左上角像素1224的像素积分值来计算方块A所包含所有像素的像素积分值14+0-4-6=4。It can be known from FIG. 12( a ) that the pixel integral value of all the pixels contained in the square A of the
同理,由图12(a)可知,原始图像1210中方块B所包含所有像素的像素积分值为1+0+1+4=6。接着,请参照图12(b),如果欲利用子积分图像1220求得原始图像1210中方块B所包含所有像素的像素积分值,则需找出子积分图像1220中的对应方块B’,并以位于方块B’的右下角像素1225及左下角像素1226的像素积分值来计算方块B所包含所有像素的像素积分值13+0-0-7=6,其中由于右上角像素及左上角像素位于右下区域之外,其像素积分值均设为0。Similarly, it can be known from FIG. 12( a ) that the pixel integral value of all pixels contained in the square B in the
针对涵括多个分割区域的特定区域的特征值计算,图13(a)及图13(b)是依照本发明一实施例所绘示的计算积分图像的范例。其中,图13(a)为原始图像1310,而图13(b)为经由上述图像感测器的计算后所获得的子积分图像1320。For the calculation of feature values of a specific region including multiple segmented regions, FIG. 13( a ) and FIG. 13( b ) are examples of calculating integral images according to an embodiment of the present invention. Wherein, FIG. 13( a ) is the
由图13(a)可知,原始图像1310中方块A所包含所有像素的像素积分值为12+7+12+6=37。接着,请参照图12(b),如果欲利用子积分图像1320求得原始图像1310中方块A所包含所有像素的像素积分值,则由于方块A涵括4个子分割区域,此时则需将方块A切分别方块A1、方块A2、方块A3及方块A4,并通过上述方式分别计算这些方块的所包含所有像素的像素积分值,最后再将这些方块的像素积分值相加,即可获得方块A所包含所有像素的像素积分值(25+0-6-7)+(7+0-0-0)+(18+0-6-0)+(6+0-0-0)=12+7+12+6=37。It can be seen from FIG. 13( a ) that the pixel integral value of all the pixels contained in the block A in the
值得一提的是,上述图像感测器的架构是将图像分割成MxN个方形区域。然而,在一实施例中,可将图像分割成若干个方形子区域,每个子区域均由2个纵向边界(Vertical boundary)和2个横向边界(Horizontalboundary)所分割/包围。分割方式可由使用者设定,不限定为棋盘状分割,亦不限定各子区域必须等大小,惟各子区域必须是长方形,藉此可有更多使用上的弹性。It is worth mentioning that the architecture of the above image sensor divides the image into MxN square areas. However, in one embodiment, the image can be divided into several square sub-regions, each sub-region is divided/surrounded by 2 vertical boundaries (Vertical boundary) and 2 horizontal boundaries (Horizontal boundary). The division method can be set by the user, and it is not limited to a chessboard division, nor is it limited that each sub-area must be of equal size, but each sub-area must be a rectangle, so as to have more flexibility in use.
针对上述图像感测器计算积分图像/分割的过程,以下则举一实例说明。图14是依照本发明一实施例所绘示的计算积分图像的范例。请参照图14,左方的图像1400为图像感测器所提取的原始图像,此图像可分割为左区域A、右上区域B、中区域C、右中区域D及右下区域E等5个不等大小的子区域,而每个子区域均为长方形,且被2个纵向边界和2个横向边界所分割/包围。同理,在另一实施例中,像素电路也可分割成若干个方形子区域,分割方式可由使用者设定,不限定为棋盘状分割,亦不限定各子区域必须等大小,惟各子区域必须均是长方形。Regarding the process of calculating the integral image/segmentation by the above image sensor, an example is given below to illustrate. FIG. 14 is an example of calculating integral images according to an embodiment of the present invention. Please refer to FIG. 14 , the image 1400 on the left is the original image extracted by the image sensor, and the image can be divided into five areas: left area A, upper right area B, middle area C, right middle area D, and lower right area E. Sub-areas of unequal size, each sub-area is rectangular and is divided/surrounded by 2 vertical boundaries and 2 horizontal boundaries. Similarly, in another embodiment, the pixel circuit can also be divided into several square sub-regions, and the division method can be set by the user. Regions must all be rectangular.
值得注意的是,图像感测器在计算各像素积分值时,是在图像上依序扫瞄计算的,不受分割的影响。在依序扫瞄时,每当跨越纵向边界时,即将线累加器重设来重新累加该子区域于该段像素线的线像素累加值。而在依序扫瞄时,如果发现该目标像素较前一条扫描线中对应像素跨越了横向边界时,即将体累加器重新累加或用直接载入新值覆盖的方式,而获得目标像素的子像素积分值。It is worth noting that when the image sensor calculates the integral value of each pixel, it scans the image sequentially and is not affected by the segmentation. During sequential scanning, whenever the vertical boundary is crossed, the line accumulator is reset to re-accumulate the line pixel accumulation value of the sub-region on the segment of the pixel line. When scanning sequentially, if it is found that the target pixel has crossed the horizontal boundary compared with the corresponding pixel in the previous scan line, the volume accumulator will be re-accumulated or overwritten by directly loading new values to obtain the sub-pixel of the target pixel. Pixel integration value.
针对上述图像感测器计算积分图像的过程,以下则举一实例说明。图15是依照本发明一实施例所绘示的计算积分图像的范例,图16是依照本发明一实施例所绘示的线累加器数值随时间变化的示意图,图17则是依照本发明一实施例所绘示的体累加器数值随时间变化的示意图。请同时参照图15、16、17,图像感测器在计算图像1500中第1条扫描线的第3个像素的像素积分值时,因跨越纵向边界,所以线累加器重新累加,获得线像素累加值为3,而该像素的子积分图像值即为3。Regarding the process of calculating the integrated image by the above image sensor, an example is given below to illustrate. Fig. 15 is an example of a calculation integral image according to an embodiment of the present invention; Fig. 16 is a schematic diagram showing the value of a line accumulator changing with time according to an embodiment of the present invention; Fig. 17 is a schematic diagram according to an embodiment of the present invention The schematic diagram of the volume accumulator value changing with time shown in the embodiment. Please refer to Figures 15, 16, and 17 at the same time. When the image sensor calculates the pixel integral value of the third pixel of the first scan line in the image 1500, because it crosses the vertical boundary, the line accumulator accumulates again to obtain the line pixel The accumulated value is 3, and the sub-integrated image value for that pixel is 3.
而当图像感测器在计算图像1500中第4条扫描线的第2个像素的像素积分值时,因均未跨越纵向与横向的边界,所以线累加器与体累加器均持续累加。是故,线累加器的累加值为1+4=5,而此线像素累加值累加至体累加器中此像素(即第2个像素)的旧值,即前一条扫描线(即第3条扫描线)中对应像素(即第2个像素)的子像素积分值,而获得目标像素的子像素积分值8+5=13,并更新为体累加器中对应像素的子像素积分值。When the image sensor calculates the pixel integral value of the second pixel of the fourth scan line in the image 1500, since neither of them crosses the vertical and horizontal boundaries, both the line accumulator and the volume accumulator continue to accumulate. Therefore, the accumulated value of the line accumulator is 1+4=5, and the accumulated value of this line pixel is added to the old value of this pixel (i.e. the 2nd pixel) in the body accumulator, i.e. the previous scanning line (i.e. the 3rd pixel) scanning line), and obtain the sub-pixel
而当图像感测器在计算图像1500中第4条扫描线的第3个像素的像素积分值时,因均跨越纵向与横向的边界,所以线累加器与体累加器均重新累加。是故,线累加器的累加值为该像素值,即为0,而体累加器的累加值则为该像素的线像素累加值0,因此获得目标像素的子像素积分值为0,并更新为体累加器中对应像素的子像素积分值。When the image sensor calculates the pixel integral value of the third pixel of the fourth scan line in the image 1500, both the line accumulator and the volume accumulator re-accumulate because they both straddle the vertical and horizontal boundaries. Therefore, the accumulated value of the line accumulator is the pixel value, which is 0, and the accumulated value of the volume accumulator is the accumulated value of the line pixel of the pixel, so the sub-pixel integral value of the target pixel is obtained as 0, and updated is the subpixel integral value of the corresponding pixel in the volume accumulator.
同理,当计算到图像1500中的第4像素线时,因第3像素到第8像素均跨越横向边界,是故,体累加器的第3像素到第8像素均需重新累加,即载入新的数据覆盖旧累加值。以此类推,待图像1500中每一条像素线的像素均扫瞄过后,即可获得图像1500的积分图像。Similarly, when calculating the 4th pixel line in the image 1500, because the 3rd pixel to the 8th pixel all cross the horizontal boundary, therefore, the 3rd pixel to the 8th pixel of the volume accumulator need to be accumulated again, that is, load Enter new data to overwrite the old accumulated value. By analogy, after the pixels of each pixel line in the image 1500 are scanned, the integrated image of the image 1500 can be obtained.
依照上述实施例的做法,无论图像被分割成不同种类或形状的方形,图像感测器都能在只使用一个线累加器以及一个体累加器的情况下,计算出积分图像。According to the above-mentioned embodiments, no matter the image is divided into different types or shapes of squares, the image sensor can calculate the integral image using only one line accumulator and one volume accumulator.
综上所述,在本发明的具有积分图像输出的图像感测器中,即通过将一组线累加器及体累加器结合至图像感测器,而能够在图像感测器提取到图像的第一时间,计算出所提取图像的积分图像,而减少处理器运算资源的消耗,并加快图像处理的速度。此外,通过将图像切分为多个区域,并利用体累加器分别运算各个区域的积分图像,也可快速取得积分图像。上述的线累加器仅需用到存储一组累加像素值的容量,而体累加器亦仅需用到存储一条像素线中的像素值的容量,因此可在节省图像感测器的成本的余,让图像感测器多了一种积分图像的输出格式可提供给后端处理器运用。To sum up, in the image sensor with integral image output of the present invention, that is, by combining a set of line accumulators and volume accumulators with the image sensor, the image sensor can extract the In the first time, the integral image of the extracted image is calculated, thereby reducing the consumption of computing resources of the processor and speeding up the speed of image processing. In addition, by dividing the image into multiple regions, and using the volume accumulator to calculate the integral image of each region, the integral image can also be obtained quickly. The above-mentioned line accumulator only needs to use the capacity to store a group of accumulated pixel values, and the volume accumulator only needs to use the capacity to store the pixel values in one pixel line, so it can save the cost of the image sensor , so that the image sensor has an additional integrated image output format that can be provided to the back-end processor for use.
虽然本发明已以实施例公开如上,然其并非用以限定本发明,本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视所附权利要求书所界定者为准。Although the present invention has been disclosed as above with the embodiments, it is not intended to limit the present invention. Those skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention, so the protection of the present invention The scope is to be determined as defined by the appended claims.
Claims (53)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910128248.5A CN101848343B (en) | 2009-03-24 | 2009-03-24 | Image sensor with integral image output |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910128248.5A CN101848343B (en) | 2009-03-24 | 2009-03-24 | Image sensor with integral image output |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101848343A CN101848343A (en) | 2010-09-29 |
CN101848343B true CN101848343B (en) | 2013-04-17 |
Family
ID=42772784
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910128248.5A Expired - Fee Related CN101848343B (en) | 2009-03-24 | 2009-03-24 | Image sensor with integral image output |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101848343B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI536810B (en) * | 2015-02-25 | 2016-06-01 | 緯創資通股份有限公司 | Image processing method thereof |
CN107886482B (en) * | 2017-11-07 | 2020-06-05 | 深圳市华星光电半导体显示技术有限公司 | Method and device for improving Bayer image contrast |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1765123A (en) * | 2004-02-13 | 2006-04-26 | 索尼株式会社 | Image processing device, image processing method and program |
-
2009
- 2009-03-24 CN CN200910128248.5A patent/CN101848343B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1765123A (en) * | 2004-02-13 | 2006-04-26 | 索尼株式会社 | Image processing device, image processing method and program |
Also Published As
Publication number | Publication date |
---|---|
CN101848343A (en) | 2010-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110751024B (en) | User identity recognition method and device based on handwritten signature and terminal equipment | |
US20200279166A1 (en) | Information processing device | |
CN104036479B (en) | Multi-focus image fusion method based on non-negative matrix factorization | |
CN102800094A (en) | Fast color image segmentation method | |
CN101267493A (en) | Correction device and method for perspective deformed document image | |
CN110991310B (en) | Portrait detection method, device, electronic equipment and computer readable medium | |
TWI382351B (en) | Image sensor with integral image output | |
US10929965B2 (en) | Histogram statistics circuit and multimedia processing system | |
US20160042246A1 (en) | A haar calculation system, an image classification system, associated methods and associated computer program products | |
Dürre et al. | A HOG-based real-time and multi-scale pedestrian detector demonstration system on FPGA | |
CN109344801A (en) | A kind of object detecting method and device | |
CN115115964A (en) | In-vehicle video image stabilization method, device, vehicle and storage medium | |
CN101848343B (en) | Image sensor with integral image output | |
US9171227B2 (en) | Apparatus and method extracting feature information of a source image | |
US9607398B2 (en) | Image processing apparatus and method of controlling the same | |
US11481919B2 (en) | Information processing device | |
CN111222446B (en) | Face recognition method, face recognition device and mobile terminal | |
US20210004667A1 (en) | Operation processing apparatus and operation processing method | |
US7702176B2 (en) | One dimensional feature enhancement | |
US20120200748A1 (en) | Image processing apparatus, electronic camera, and storage medium storing image processing program | |
CN109614841B (en) | Rapid face detection method in embedded system | |
Tan et al. | Resource minimization in a real-time depth-map processing system on FPGA | |
KR101407070B1 (en) | Method of extracting feature for human detection and apparatus for performing the same | |
CN116883981A (en) | A license plate positioning and recognition method, system, computer equipment and storage medium | |
CN113869326A (en) | SURF feature point extraction method, system, computer device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130417 Termination date: 20210324 |