CN101763175A - Image processing method for displacement detection device and displacement detection device using the same - Google Patents

Image processing method for displacement detection device and displacement detection device using the same Download PDF

Info

Publication number
CN101763175A
CN101763175A CN200810189402A CN200810189402A CN101763175A CN 101763175 A CN101763175 A CN 101763175A CN 200810189402 A CN200810189402 A CN 200810189402A CN 200810189402 A CN200810189402 A CN 200810189402A CN 101763175 A CN101763175 A CN 101763175A
Authority
CN
China
Prior art keywords
image
analog
detection device
displacement detection
digital
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200810189402A
Other languages
Chinese (zh)
Other versions
CN101763175B (en
Inventor
赵子毅
陈信嘉
苏宗敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pixart Imaging Inc
Original Assignee
Pixart Imaging Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pixart Imaging Inc filed Critical Pixart Imaging Inc
Priority to CN201210184534.5A priority Critical patent/CN102854997B/en
Priority to CN2008101894025A priority patent/CN101763175B/en
Publication of CN101763175A publication Critical patent/CN101763175A/en
Application granted granted Critical
Publication of CN101763175B publication Critical patent/CN101763175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)

Abstract

An image processing method of a displacement detection device, the method comprising the steps of: acquiring a first image and solving the average brightness of the first image; judging whether the average brightness is between a first threshold value and a second threshold value; when the average brightness is between the first threshold and a second threshold, judging whether the attenuation value of the first image is deducted; updating the attenuation value and gain when the attenuation value has not been subtracted from the first image; subtracting the updated attenuation value from the first image and amplifying the attenuated first image by the gain; and comparing the attenuated and amplified first image with a reference image to obtain a displacement. The invention also provides a displacement detection device.

Description

位移检测装置的图像处理方法及使用该方法的位移检测装置 Image processing method of displacement detection device and displacement detection device using the method

技术领域technical field

本发明涉及一种位移检测装置,特别涉及一种位移检测装置的图像处理方法及使用该方法的位移检测装置。The invention relates to a displacement detection device, in particular to an image processing method of the displacement detection device and a displacement detection device using the method.

背景技术Background technique

当诸如鼠标的位移检测装置中的图像感测装置所感测的图像亮度未处于预设范围时,通常需要通过调整所述位移检测装置的曝光时间以使所述位移检测装置中的图像感测装置能够获取具有适当亮度的图像。例如美国专利第6,297,513号的“用于微结构表面光学导航的曝光控制机制(Exposure Servofor Optical Navigation over Micro-textured Surface)”,所述专利根据位移检测装置所获取图像的平均亮度以控制曝光参数,所述专利的控制方法包括下列步骤:(a)改变曝光控制参数的设定,直到平均亮度为最大可能值的50%;(b)如果位移检测的相关数据(correlated data)符合要求,维持目前的曝光参数设定,否则进一步改变曝光控制参数直到相关数据符合要求;(c)储存目前的平均亮度;(d)以目前的曝光控制参数进行导航(navigation)以求得位移量,其中所述导航的步骤包括储存最新的平均亮度及相关数据;以及(e)调整曝光控制参数。When the brightness of the image sensed by the image sensing device in the displacement detection device such as a mouse is not in the preset range, it is usually necessary to adjust the exposure time of the displacement detection device to make the image sensing device in the displacement detection device An image with appropriate brightness can be acquired. For example, U.S. Patent No. 6,297,513 "Exposure Servo for Optical Navigation over Micro-textured Surface", which controls the exposure parameters according to the average brightness of the image captured by the displacement detection device, The control method of said patent includes the following steps: (a) changing the setting of exposure control parameters until the average brightness is 50% of the maximum possible value; (b) maintaining the current Otherwise, further change the exposure control parameters until the relevant data meet the requirements; (c) store the current average brightness; (d) use the current exposure control parameters to navigate (navigation) to obtain the displacement, wherein The steps of navigating include storing the latest average brightness and related data; and (e) adjusting exposure control parameters.

然而,上述曝光控制方法仅限于当图像平均亮度未处于预设范围时用于改变曝光控制参数以调整具有不同反射强度的表面图像亮度。当图像的平均亮度符合要求时,位移检测装置所获取的图像并未进一步被处理,因而无法有效提升反射表面图像的动态处理能力。However, the above exposure control method is limited to changing the exposure control parameters to adjust the brightness of surface images with different reflection intensities when the average brightness of the image is not within the preset range. When the average brightness of the image meets the requirement, the image acquired by the displacement detection device is not further processed, so the dynamic processing capability of the reflective surface image cannot be effectively improved.

基于上述原因,确实仍有必要另提出一种位移检测装置的图像处理方法,以增加具有不同反射强度的表面图像分辨率,进而增加反射表面图像的动态处理能力。Based on the above reasons, it is indeed still necessary to propose another image processing method for the displacement detection device to increase the resolution of surface images with different reflection intensities, thereby increasing the dynamic processing capability of reflection surface images.

发明内容Contents of the invention

本发明提供一种位移检测装置的图像处理方法及使用该方法的位移检测装置,所述位移检测装置利用模拟/数字单元结合放大器来处理图像传感器所获取的图像,以增加具有不同反射强度的表面图像分辨率,进而增加反射表面图像的动态处理能力。The invention provides an image processing method of a displacement detection device and a displacement detection device using the method. The displacement detection device uses an analog/digital unit combined with an amplifier to process the image acquired by the image sensor to increase the surface with different reflection intensities Image resolution, which in turn increases dynamic handling of reflective surface images.

本发明提供一种位移检测装置的图像处理方法及使用该方法的位移检测装置,所述位移检测装置利用非线性模拟/数字函数来处理图像传感器所获取的图像,以增加具有不同反射强度的表面图像分辨率,进而增加反射表面图像的动态处理能力。The invention provides an image processing method of a displacement detection device and a displacement detection device using the method. The displacement detection device uses a nonlinear analog/digital function to process images acquired by an image sensor to increase surfaces with different reflection intensities Image resolution, which in turn increases dynamic handling of reflective surface images.

本发明提供一种位移检测装置的图像处理方法,所述位移检测装置根据曝光参数获取图像,所述图像处理方法包括下列步骤:获取第一图像并求出所述第一图像的平均亮度;判断所述平均亮度是否处于第一阈值与第二阈值之间;当所述平均亮度不处于所述第一阈值与第二阈值之间时,改变所述位移检测装置的曝光参数,并比对所述第一图像与参考图像以求得位移量;当所述平均亮度处于所述第一阈值与第二阈值之间时,判断所述第一图像是否已扣除衰减值;当所述第一图像已扣除所述衰减值时,比对所述第一图像与参考图像以求得位移量;当所述第一图像尚未扣除所述衰减值时,更新所述衰减值和增益;从第一图像扣除更新后的衰减值并以所述增益放大衰减后的所述第一图像;将衰减并放大后的所述第一图像与参考图像进行比对以求得位移量;以及将所述位移量传输至图像显示装置。The invention provides an image processing method of a displacement detection device. The displacement detection device obtains an image according to exposure parameters. The image processing method includes the following steps: obtaining a first image and calculating the average brightness of the first image; judging Whether the average brightness is between the first threshold and the second threshold; when the average brightness is not between the first threshold and the second threshold, change the exposure parameters of the displacement detection device, and compare the The first image and the reference image are used to obtain the displacement; when the average brightness is between the first threshold and the second threshold, it is judged whether the attenuation value has been deducted from the first image; when the first image When the attenuation value has been deducted, compare the first image with the reference image to obtain the displacement; when the first image has not deducted the attenuation value, update the attenuation value and gain; from the first image subtracting the updated attenuation value and amplifying the attenuated first image with the gain; comparing the attenuated and amplified first image with a reference image to obtain a displacement; and calculating the displacement transmitted to the image display device.

在本发明的位移检测装置的图像处理方法中,所述增益可以为线性增益或非线性增益;数字化的方式可以为线性或非线性。In the image processing method of the displacement detection device of the present invention, the gain may be a linear gain or a nonlinear gain; the digitalization method may be linear or nonlinear.

根据本发明的另一特点,本发明另提供一种位移检测装置,该位移检测装置包括图像传感器、数字/模拟单元、加法单元、放大器、模拟/数字单元及数字信号处理器。图像传感器用于获取表面的图像以形成模拟图像,其中所述模拟图像具有平均亮度。数字/模拟单元用于产生衰减值。加法单元耦合所述图像传感器及所述数字/模拟单元,用于将所述模拟图像扣除所述衰减值。放大器放大衰减后的模拟图像。模拟/数字单元数字化衰减并放大后的所述模拟图像。数字信号处理器比对数字化后的模拟图像与参考图像以形成位移量,并控制所述数字/模拟单元产生所述衰减值。According to another feature of the present invention, the present invention further provides a displacement detection device, which includes an image sensor, a digital/analog unit, an adding unit, an amplifier, an analog/digital unit, and a digital signal processor. An image sensor is used to acquire an image of the surface to form a simulated image, wherein the simulated image has an average brightness. A digital/analog unit is used to generate the attenuation value. The adding unit is coupled to the image sensor and the digital/analog unit, and is used for subtracting the attenuation value from the analog image. The amplifier amplifies the attenuated analog image. An analog/digital unit digitizes the attenuated and amplified analog image. The digital signal processor compares the digitized analog image with the reference image to form a displacement, and controls the digital/analog unit to generate the attenuation value.

根据本发明的另一特点,本发明另提供一种位移检测装置,该位移检测装置包括图像传感器、数字/模拟单元、加法单元、非线性模拟/数字单元及数字信号处理器。图像传感器用于获取表面的图像以形成模拟图像,其中所述模拟图像具有平均亮度。数字/模拟单元用于产生衰减值。加法单元耦合所述图像传感器及所述数字/模拟单元,用于将所述模拟图像扣除所述衰减值。非线性模拟/数字单元数字化衰减后的模拟图像。数字信号处理器比对数字化后的模拟图像与参考图像以形成位移量,并控制所述数字/模拟单元产生所述衰减值。According to another feature of the present invention, the present invention further provides a displacement detection device, which includes an image sensor, a digital/analog unit, an adding unit, a nonlinear analog/digital unit, and a digital signal processor. An image sensor is used to acquire an image of the surface to form a simulated image, wherein the simulated image has an average brightness. A digital/analog unit is used to generate the attenuation value. The adding unit is coupled to the image sensor and the digital/analog unit, and is used for subtracting the attenuation value from the analog image. The non-linear analog/digital unit digitizes the attenuated analog image. The digital signal processor compares the digitized analog image with the reference image to form a displacement, and controls the digital/analog unit to generate the attenuation value.

本发明的位移检测装置中,根据不同的应用,模拟/数字单元可以为线性或非线性模拟/数字单元,放大器可具有线性及非线性的增益,以有效增加表面图像分辨率。In the displacement detection device of the present invention, according to different applications, the analog/digital unit can be a linear or nonlinear analog/digital unit, and the amplifier can have linear and nonlinear gains to effectively increase the surface image resolution.

附图说明Description of drawings

图1为本发明实施例的位移检测装置的框图。FIG. 1 is a block diagram of a displacement detection device according to an embodiment of the present invention.

图2为本发明实施例的图像处理方法的框图,其中,(a)为图2中图像传感器所获取的图像亮度一维分布示意图;(b)为图2中衰减后的图像亮度一维分布示意图;以及(c)为图2中衰减并放大后的图像亮度一维分布示意图。Fig. 2 is a block diagram of an image processing method according to an embodiment of the present invention, wherein (a) is a schematic diagram of a one-dimensional distribution of image brightness acquired by an image sensor in Fig. 2; (b) is a one-dimensional distribution of image brightness after attenuation in Fig. 2 Schematic diagram; and (c) is a schematic diagram of the one-dimensional distribution of image brightness after attenuation and amplification in FIG. 2 .

图3为本发明实施例的图像处理方法的另一框图,其中,(a)为图3中图像传感器所获取的图像亮度一维分布示意图;(b)为图3中衰减后的图像亮度一维分布示意图;以及(c)为图3中经过非线性模拟/数字单元后的图像亮度一维分布示意图。Fig. 3 is another block diagram of an image processing method according to an embodiment of the present invention, wherein (a) is a schematic diagram of a one-dimensional distribution of image brightness obtained by the image sensor in Fig. 3; (b) is a schematic diagram of the attenuated image brightness in Fig. 3 and (c) is a schematic diagram of the one-dimensional distribution of image brightness after passing through the nonlinear analog/digital unit in FIG. 3 .

图4为显示数字值与模拟电压的关系的图,其中,(a)为显示数字值与模拟电压的线性关系的图;以及(b)为显示数字值与模拟电压的非线性关系的图。4 is a graph showing a relationship between a digital value and an analog voltage, wherein (a) is a graph showing a linear relationship between a digital value and an analog voltage; and (b) is a graph showing a nonlinear relationship between a digital value and an analog voltage.

图5为本发明实施例的位移检测装置的图像处理方法的流程图。FIG. 5 is a flowchart of an image processing method of the displacement detection device according to an embodiment of the present invention.

主要组件符号说明Explanation of main component symbols

1:位移检测装置                 10:光源1: Displacement detection device 10: Light source

11:图像传感器                  12:图像处理单元11: Image sensor 12: Image processing unit

121:数字/模拟单元              122:放大器121: Digital/Analog Unit 122: Amplifier

123:模拟/数字单元              124:数字信号处理器123: Analog/Digital Unit 124: Digital Signal Processor

125:传输接口单元               ADD:加法单元125: Transmission interface unit ADD: Addition unit

Dx:平均亮度                    Ax:亮度特征变化值D x : Average luminance A x : Luminance characteristic change value

DAC:衰减值                     g:增益DAC: attenuation value g: gain

110~170:步骤110~170: steps

具体实施方式Detailed ways

为了让本发明的上述和其它目的、特征及优点能更明显,下文列举了本发明的实施例,并结合所附图示,作详细说明如下。In order to make the above and other objects, features, and advantages of the present invention more apparent, the embodiments of the present invention are listed below and described in detail in conjunction with the accompanying drawings.

请参照图1所示,图1显示了本发明实施例的位移检测装置1,该位移检测装置1包括光源10、图像传感器11及图像处理单元12。光源10的实施例包括发光二极管或镭射二极管,用于照明表面S,例如桌面或鼠标垫表面。图像传感器11的实施例包括电荷耦合组件(CCD)图像传感器或互补金属氧化物半导体(CMOS)图像传感器,用于感测所述表面S的反射光以产生二维模拟图像,所述二维模拟图像为所述图像传感器11的各像素的亮度值所组成的图像。图像处理单元12耦合所述光源10及所述图像传感器11,用于处理所述图像传感器11所获取的图像并控制所述光源10的发光机制,例如发光频率及亮度等。在本发明中,通过利用所述图像处理单元12进一步处理所述图像传感器11所获取的图像,以有效增加所述表面S的图像分辨率。Please refer to FIG. 1 . FIG. 1 shows a displacement detection device 1 according to an embodiment of the present invention. The displacement detection device 1 includes a light source 10 , an image sensor 11 and an image processing unit 12 . Examples of light sources 10 include light emitting diodes or laser diodes for illuminating a surface S, such as a table top or a mouse pad surface. Embodiments of the image sensor 11 include a charge-coupled device (CCD) image sensor or a complementary metal-oxide-semiconductor (CMOS) image sensor for sensing reflected light from the surface S to generate a two-dimensional analog image, the two-dimensional analog The image is an image composed of brightness values of each pixel of the image sensor 11 . The image processing unit 12 is coupled to the light source 10 and the image sensor 11 for processing the image captured by the image sensor 11 and controlling the light emitting mechanism of the light source 10 , such as light emitting frequency and brightness. In the present invention, the image resolution of the surface S is effectively increased by using the image processing unit 12 to further process the image captured by the image sensor 11 .

所述图像处理单元12包括数字/模拟单元(DAC)121、放大器122、模拟/数字单元(ADC)123、数字信号处理器(Digital Signal Processor,DSP)124及传输接口单元125。数字/模拟单元121接收数字信号处理器124的数字信号以产生直流的衰减值(本说明书中称作DAC),所述衰减值用于衰减所述图像传感器11所获取的二维模拟图像的亮度值,以避免在后续放大及数字化步骤中,像素亮度超出预设范围(例如0~255灰阶值)。放大器122则用于放大已扣除所述衰减值(衰减后)的二维模拟图像,所述放大器122可为线性或非线性放大器,且所述放大器122可根据模拟/数字单元123的种类而被省略。所述模拟/数字单元123可为线性或非线性模拟/数字单元,用于将所述图像传感器11所获取的二维模拟图像(已扣除或未扣除所述衰减值并放大)转换为数字值,例如0~255范围内的灰阶值;所述数字信号处理器124接收来自所述模拟/数字单元123的每一像素的灰阶值以形成二维数字图像并求得位移量,例如根据不同时间的数字图像间的相关性(correlation)求得所述位移量。此外,所述数字信号处理器124控制所述数字/模拟单元121产生衰减值,这是根据所述数字信号处理器124所处理的图像而决定的。传输接口单元125将所述数字信号处理器124所求得的位移量无线或有线地传输至图像显示装置(未示出)以进行相对的控制。The image processing unit 12 includes a digital/analog unit (DAC) 121, an amplifier 122, an analog/digital unit (ADC) 123, a digital signal processor (Digital Signal Processor, DSP) 124 and a transmission interface unit 125. The digital/analog unit 121 receives the digital signal from the digital signal processor 124 to generate a DC attenuation value (referred to as DAC in this specification), and the attenuation value is used to attenuate the brightness of the two-dimensional analog image acquired by the image sensor 11 value, so as to prevent the brightness of the pixel from exceeding a preset range (for example, 0-255 grayscale values) in subsequent amplification and digitization steps. The amplifier 122 is used to amplify the two-dimensional analog image after the attenuation value has been deducted (after attenuation). omitted. The analog/digital unit 123 can be a linear or non-linear analog/digital unit for converting the two-dimensional analog image (with or without subtracting the attenuation value and amplifying) acquired by the image sensor 11 into a digital value , such as a grayscale value within the range of 0 to 255; the digital signal processor 124 receives the grayscale value of each pixel from the analog/digital unit 123 to form a two-dimensional digital image and obtain the displacement, for example, according to The correlation between digital images at different times is used to obtain the displacement. In addition, the digital signal processor 124 controls the digital/analog unit 121 to generate an attenuation value, which is determined according to the image processed by the digital signal processor 124 . The transmission interface unit 125 wirelessly or wiredly transmits the displacement obtained by the digital signal processor 124 to an image display device (not shown) for relative control.

请参照图2中的(a)至(c)所示,显示了本发明实施例的图像处理方法的框图。图2中的(a)至(c)显示一种实施例在不同处理阶段中图像亮度的一维分布示意图。首先,所述图像传感器11获取所述表面S的二维模拟图像,其中图2中的(a)表示所述二维模拟图像中一列像素的亮度值(Dx+Ax)随所述图像传感器11的感测阵列(未示出)横向距离的变化、Dx表示平均亮度且Ax表示亮度特征变化值。所述亮度值(Dx+Ax)经过加法单元ADD(亦可利用减法器实现)与衰减值相减后成为(Dx-DAC)+Ax并显示于图2中的(b),其中DAC的大小由所述数字信号处理器124决定。所述放大器122具有增益g,接着以所述增益g放大衰减后的二维模拟图像的一列像素的亮度值(Dx-DAC)+Ax后成为g×(Dx-DAC)+g×Ax并显示于图2中的(c),其中g×Ax为亮度变化的小波信号。最后,所述模拟/数字单元123将衰减并放大后的二维模拟图像的一列像素的亮度分布以线性或非线性的方式转换为数字值(数字化)并将其传送至所述数字信号处理器124。必须了解的是,所述亮度值(Dx+Ax)扣除DAC的目的在于避免在后续放大及数字化步骤中有亮度值过大的情况;比较图2中(b)与(c)可知,二维模拟图像的一列像素的亮度值经过放大后,亮度特征变化值Ax的峰峰值(peak-and-peak value)明显增加,有助于增加数字化后图像的分辨率。此外,所述放大器122的增益可为线性或非线性。可以理解的是,虽然此处以二维模拟图像的一列像素的亮度来说明,实际上所述二维模拟图像的所有像素均利用本图像处理方法进一步处理。Please refer to (a) to (c) in FIG. 2 , which show a block diagram of an image processing method according to an embodiment of the present invention. (a) to (c) in FIG. 2 show a schematic diagram of one-dimensional distribution of image brightness in different processing stages of an embodiment. First, the image sensor 11 acquires a two-dimensional analog image of the surface S, wherein (a) in FIG. 2 indicates that the brightness value (D x +A x ) of a column of pixels in the two-dimensional analog image varies with The variation of the lateral distance of the sensing array (not shown) of the sensor 11, Dx represents the average luminance and Ax represents the luminance characteristic change value. The luminance value (D x +A x ) is subtracted from the attenuation value by the addition unit ADD (which can also be realized by a subtractor) to become (D x -DAC)+A x and is shown in (b) in FIG. 2 , The size of the DAC is determined by the digital signal processor 124 . The amplifier 122 has a gain g, and then amplifies the brightness value (D x −DAC)+A x of a column of pixels of the attenuated two-dimensional analog image with the gain g to become g×(D x −DAC)+g× A x is shown in (c) in Fig. 2, where g×A x is the wavelet signal of brightness change. Finally, the analog/digital unit 123 converts the brightness distribution of a column of pixels of the attenuated and enlarged two-dimensional analog image into digital values (digitized) in a linear or non-linear manner and transmits it to the digital signal processor 124. It must be understood that the purpose of subtracting the DAC from the luminance value (D x +A x ) is to avoid the situation that the luminance value is too large in the subsequent amplification and digitization steps; comparing (b) and (c) in Figure 2, we can see that, After the luminance value of a column of pixels in the two-dimensional analog image is amplified, the peak-and-peak value of the luminance characteristic change value A x increases significantly, which helps to increase the resolution of the digitized image. In addition, the gain of the amplifier 122 can be linear or non-linear. It can be understood that although the brightness of a column of pixels of the two-dimensional analog image is used for illustration, in fact all pixels of the two-dimensional analog image are further processed by the image processing method.

请参照图4中的(a)和(b)所示,图4中的(a)显示当放大器122或模拟/数字单元123为线性时,数字化阶段中数字值与模拟电压的关系;图4中的(b)显示当放大器122或模拟/数字单元123为非线性时,数字化阶段中数字数值与模拟电压的关系。比较图4中的(a)与(b)可知,在非线性放大及数字化的步骤中,相同的模拟电压变化相对于较大的数字值变化,也可得到较高的分辨率。Please refer to (a) and (b) shown in Figure 4, (a) in Figure 4 shows when the amplifier 122 or the analog/digital unit 123 is linear, the relationship between the digital value and the analog voltage in the digitization stage; Figure 4 (b) in (b) shows the relationship between the digital value and the analog voltage in the digitization stage when the amplifier 122 or the analog/digital unit 123 is non-linear. Comparing (a) and (b) in Figure 4 shows that in the steps of nonlinear amplification and digitization, a higher resolution can be obtained for the same analog voltage change relative to a larger digital value change.

请参照图3中的(a)至(c)所示,显示了本发明实施例的图像处理方法的另一框图。图3与图2的差异在于,图3中仅使用一个非线性模拟/数字单元123而不使用放大器122。同样地,所述图像传感器11先获取所述表面S的二维模拟图像,如图3中的(a)所示。接着所述二维模拟图像的一列像素的亮度值(Dx+Ax)经过加法单元ADD与衰减值DAC相减后成为(Dx-DAC)+Ax并显示于图3中的(b)。最后,所述非线性模拟/数字单元123以非线性的方式数字化所述图像传感器11所获取的二维模拟图像,显示于图3中的(c),并将其传送至所述数字信号处理器124。所述数字信号处理器124则根据目前所处理的图像决定所述图像传感器11在获取下一张图像时应扣除的衰减值及增益,并通知所述数字/模拟单元121产生所述衰减值。Please refer to (a) to (c) in FIG. 3 , which show another block diagram of the image processing method according to the embodiment of the present invention. The difference between FIG. 3 and FIG. 2 is that only one nonlinear analog/digital unit 123 is used instead of the amplifier 122 in FIG. 3 . Likewise, the image sensor 11 first acquires a two-dimensional simulated image of the surface S, as shown in (a) in FIG. 3 . Then the luminance value (D x +A x ) of a column of pixels in the two-dimensional analog image is subtracted by the addition unit ADD and the attenuation value DAC to become (D x -DAC)+A x and is shown in (b in FIG. 3 ). Finally, the nonlinear analog/digital unit 123 digitizes the two-dimensional analog image captured by the image sensor 11 in a nonlinear manner, as shown in (c) in FIG. 3 , and sends it to the digital signal processing device 124. The digital signal processor 124 determines the attenuation value and gain to be deducted by the image sensor 11 when acquiring the next image according to the currently processed image, and notifies the digital/analog unit 121 to generate the attenuation value.

请参照图5,图5显示了本发明实施例的位移检测装置的图像处理方法的流程图。所述图像处理方法包括下列步骤:利用图像传感器获取第一图像,所述第一图像具有平均亮度(步骤110);判断所述平均亮度是否收敛于第一阈值与第二阈值之间(步骤120);若不是,更改曝光参数(步骤130)并比对所述第一图像与参考图像以输出位移量(步骤170),接着重新获取下一张图像;若所述平均亮度收敛于所述第一及第二阈值之间,则判断所述第一图像是否已扣除衰减值(步骤140),若是,则执行步骤170,若不是,则更新所述衰减值及增益(步骤150);扣除衰减值并以所述增益放大衰减后的所述第一图像(步骤160);以及比对衰减并放大后的所述第一图像与参考图像以输出位移量(步骤170),最后重新获取图像以重复上述步骤。Please refer to FIG. 5 , which shows a flow chart of an image processing method of the displacement detection device according to an embodiment of the present invention. The image processing method comprises the following steps: utilizing an image sensor to acquire a first image, the first image has an average brightness (step 110); judging whether the average brightness converges between a first threshold and a second threshold (step 120 ); if not, change the exposure parameters (step 130) and compare the first image with the reference image to output the displacement (step 170), then reacquire the next image; if the average brightness converges to the first Between one and the second threshold, it is judged whether the attenuation value (step 140) has been deducted from the first image, if so, step 170 is performed, if not, the attenuation value and gain are updated (step 150); value and amplify the attenuated first image with the gain (step 160); and compare the attenuated and amplified first image with a reference image to output a displacement (step 170), and finally reacquire the image to Repeat the above steps.

请再参照图1、2、3及5所示,下面说明本发明实施例的位移检测装置的图像处理方法的详细实施方式。首先,利用所述图像传感器11获取所述表面S的第一图像,所述第一图像具有平均亮度(例如Dx),其中所述图像传感器11的感测阵列的一列像素所感测的亮度分布可如图2中的(a)所示(步骤110)。接着所述图像处理单元12判断所述平均亮度是否处于两阈值之间(例如在256灰阶范围中,第一阈值可为64,第二阈值可为128,但并不限于此)(步骤120)。当所述平均亮度不处于两预设阈值之间时,所述图像处理单元12则更改曝光参数,例如改变所述光源10的发光强度和/或频率等,以使所述图像传感器11获取的下一张图像的平均亮度可处于两预设阈值之间(步骤130);接着所述图像处理单元12比对所述第一图像及参考图像以求得位移量(步骤170),并将其传送至所述传输接口单元125进行传输,其中所述参考图像例如可为所述图像传感器11所获取的所述第一图像的前一张图像。当所述平均亮度处于两预设阈值之间时,所述图像处理单元12判断所述第一图像是否已扣除衰减值(如图2和图3所示)(步骤140),若已扣除衰减值,则所述图像处理单元12直接将所述第一图像转换为数字图像并比对数字化后的第一图像及参考图像以求得位移量(步骤170),且所述位移量将通过所述传输接口单元125进行传输;若所述第一图像尚未扣除衰减值,所述图像处理单元12则根据所述第一图像判断目前的衰减值及增益,并更新根据上一张图像所求得的衰减值及增益(步骤150),其中所述增益可为线性增益或非线性增益。接着扣除衰减值并以所述增益放大衰减后的所述第一图像(如图2和图3所示)(步骤160),并利用模拟/数字单元进行图像数字化,其中所述数字化的方式可为线性或非线性;当所述模拟/数字单元为非线性模拟/数字单元时,可省略步骤150中的更新增益步骤以及步骤160。最后,所述图像处理单元12比对数字化后的所述第一图像及参考图像以求得位移量(步骤170),并通过所述传输接口单元125进行传输,其中所述位移量例如可通过比对所述第一图像及所述参考图像的相关性求得。最后,所述图像传感器11重新获取新的图像并重复步骤110~170。Referring again to FIGS. 1 , 2 , 3 and 5 , the detailed implementation of the image processing method of the displacement detection device according to the embodiment of the present invention will be described below. First, use the image sensor 11 to acquire a first image of the surface S, the first image has an average brightness (for example, D x ), wherein the brightness distribution sensed by a row of pixels of the sensing array of the image sensor 11 It may be shown in (a) in FIG. 2 (step 110). Then the image processing unit 12 judges whether the average brightness is between two thresholds (for example, in the 256 gray scale range, the first threshold can be 64, and the second threshold can be 128, but not limited thereto) (step 120 ). When the average brightness is not between the two preset thresholds, the image processing unit 12 changes the exposure parameters, such as changing the luminous intensity and/or frequency of the light source 10, so that the image captured by the image sensor 11 The average brightness of the next image can be between two preset thresholds (step 130); then the image processing unit 12 compares the first image and the reference image to obtain the amount of displacement (step 170), and and transmitted to the transmission interface unit 125 for transmission, wherein the reference image may be, for example, a previous image of the first image captured by the image sensor 11 . When the average brightness is between two preset thresholds, the image processing unit 12 judges whether the attenuation value has been deducted from the first image (as shown in FIGS. 2 and 3 ) (step 140), if the attenuation has been deducted value, then the image processing unit 12 directly converts the first image into a digital image and compares the digitized first image with the reference image to obtain the displacement (step 170), and the displacement will be obtained by the The transmission interface unit 125 transmits; if the first image has not deducted the attenuation value, the image processing unit 12 judges the current attenuation value and gain according to the first image, and updates the obtained value based on the previous image. The attenuation value and gain of (step 150), wherein the gain can be a linear gain or a nonlinear gain. Then subtract the attenuation value and amplify the attenuated first image with the gain (as shown in Figure 2 and Figure 3) (step 160), and use the analog/digital unit to digitize the image, wherein the digitization method can be be linear or non-linear; when the analog/digital unit is a non-linear analog/digital unit, the step of updating the gain in step 150 and step 160 can be omitted. Finally, the image processing unit 12 compares the digitized first image with the reference image to obtain the displacement (step 170), and transmits it through the transmission interface unit 125, wherein the displacement can be obtained, for example, through Comparing the correlation between the first image and the reference image to obtain. Finally, the image sensor 11 reacquires a new image and repeats steps 110-170.

综上所述,由于常用的位移检测装置的曝光控制方法仅在图像平均亮度不处于预设范围时进行曝光控制参数调整,并且无法有效提升反射表面图像的动态处理能力。本发明利用线性或非线性的方式进一步处理图像传感器所获取的图像(如图2和图3所示)以增加图像亮度特征变化的峰峰值,具有增加不同反射强度的表面图像分辨率及增加反射表面图像的动态处理能力的效果。To sum up, the exposure control method of the commonly used displacement detection device only adjusts the exposure control parameters when the average brightness of the image is not in the preset range, and cannot effectively improve the dynamic processing capability of the reflective surface image. The present invention further processes the images acquired by the image sensor (as shown in Fig. 2 and Fig. 3 ) in a linear or non-linear manner to increase the peak-to-peak value of the image brightness feature change, which has the ability to increase the surface image resolution of different reflection intensities and increase the reflection The effect of dynamic processing capabilities of surface images.

虽然本发明已以前述较佳实施例揭示,但其并非用于限定本发明,任何本发明所属技术领域中的普通技术人员在不脱离本发明的精神和范围内,可做出各种更正与修改。因此本发明的保护范围应当视所附的权利要求所界定的范围为准。Although the present invention has been disclosed with the aforementioned preferred embodiments, it is not intended to limit the present invention, and any person of ordinary skill in the technical field to which the present invention belongs can make various corrections and modifications without departing from the spirit and scope of the present invention. Revise. Therefore, the protection scope of the present invention should be determined by the scope defined by the appended claims.

Claims (16)

1.一种位移检测装置的图像处理方法,该位移检测装置根据曝光参数获取图像,该图像处理方法包括下列步骤:1. An image processing method of a displacement detection device, the displacement detection device obtains an image according to exposure parameters, and the image processing method comprises the following steps: 获取第一图像并求出该第一图像的平均亮度;Acquiring a first image and calculating the average brightness of the first image; 判断所述平均亮度是否处于第一阈值与第二阈值之间;judging whether the average brightness is between a first threshold and a second threshold; 当所述平均亮度处于所述第一阈值与第二阈值之间时,判断所述第一图像是否已扣除衰减值;When the average brightness is between the first threshold and the second threshold, judging whether the attenuation value has been deducted from the first image; 当所述第一图像尚未扣除所述衰减值时,更新所述衰减值和增益;When the attenuation value has not been deducted from the first image, updating the attenuation value and the gain; 从第一图像扣除更新后的衰减值并以所述增益放大衰减后的所述第一图像;以及subtracting the updated attenuation value from the first image and amplifying the attenuated first image by the gain; and 将衰减并放大后的所述第一图像与参考图像进行比对以求得位移量。Comparing the attenuated and amplified first image with the reference image to obtain the displacement. 2.根据权利要求1所述的图像处理方法,该图像处理方法还包括下列步骤:2. The image processing method according to claim 1, the image processing method further comprising the following steps: 当所述平均亮度不处于所述第一阈值与第二阈值之间时,改变所述位移检测装置的所述曝光参数;以及changing the exposure parameter of the displacement detection device when the average brightness is not between the first threshold and a second threshold; and 比对所述第一图像与所述参考图像以求得位移量。Comparing the first image with the reference image to obtain a displacement. 3.根据权利要求1所述的图像处理方法,该图像处理方法还包括下列步骤:当所述第一图像已扣除所述衰减值时,比对所述第一图像与所述参考图像以求得位移量。3. The image processing method according to claim 1, further comprising the step of: when the attenuation value has been deducted from the first image, comparing the first image with the reference image to find get displacement. 4.根据权利要求1所述的图像处理方法,其中所述参考图像为所述位移检测装置所获取的所述第一图像的前一张图像。4. The image processing method according to claim 1, wherein the reference image is a previous image of the first image acquired by the displacement detection device. 5.根据权利要求1所述的图像处理方法,其中在256灰阶范围内,所述第一阈值为64且所述第二阈值为128。5. The image processing method according to claim 1, wherein in the range of 256 gray scales, the first threshold is 64 and the second threshold is 128. 6.根据权利要求1所述的图像处理方法,该图像处理方法还包括下列步骤:将所述位移量传输至图像显示装置。6. The image processing method according to claim 1, further comprising the step of: transmitting the displacement to an image display device. 7.根据权利要求1所述的图像处理方法,其中以所述增益放大衰减后的所述第一图像的步骤中,所述增益为线性增益或非线性增益。7. The image processing method according to claim 1, wherein in the step of amplifying the attenuated first image with the gain, the gain is a linear gain or a nonlinear gain. 8.根据权利要求1所述的图像处理方法,其中在比对衰减并放大后的所述第一图像与所述参考图像之前,还包括下列步骤:将衰减并放大后的所述第一图像数字化。8. The image processing method according to claim 1, wherein before comparing the attenuated and enlarged first image with the reference image, the following step is further included: the attenuated and enlarged first image Digitizing. 9.根据权利要求8所述的图像处理方法,其中所述数字化的方式可以为线性或非线性。9. The image processing method according to claim 8, wherein the digitalization method can be linear or non-linear. 10.一种位移检测装置,该位移检测装置包括:10. A displacement detection device, the displacement detection device comprising: 图像传感器,用于获取表面的图像以形成模拟图像,其中所述模拟图像具有平均亮度;an image sensor for acquiring an image of the surface to form a simulated image, wherein the simulated image has an average brightness; 数字/模拟单元,用于产生衰减值;Digital/analog unit for generating attenuation values; 加法单元,耦合所述图像传感器和所述数字/模拟单元,用于从所述模拟图像扣除所述衰减值;an addition unit, coupled to the image sensor and the digital/analog unit, for subtracting the attenuation value from the analog image; 放大器,放大衰减后的模拟图像;Amplifier to amplify the attenuated analog image; 模拟/数字单元,将衰减并放大后的所述模拟图像数字化;以及an analog/digital unit digitizing the attenuated and amplified analog image; and 数字信号处理器,比对数字化后的所述模拟图像与参考图像以形成位移量,并控制所述数字/模拟单元产生所述衰减值。The digital signal processor compares the digitized analog image with a reference image to form a displacement, and controls the digital/analog unit to generate the attenuation value. 11.根据权利要求10所述的位移检测装置,该位移检测装置还包括传输接口单元,该传输接口单元用于将所述位移量传输至图像显示装置。11. The displacement detection device according to claim 10, further comprising a transmission interface unit for transmitting the displacement amount to an image display device. 12.根据权利要求10所述的位移检测装置,其中所述放大器为线性放大器或非线性放大器。12. The displacement detection device according to claim 10, wherein the amplifier is a linear amplifier or a nonlinear amplifier. 13.根据权利要求10所述的位移检测装置,其中所述模拟/数字单元为线性或非线性模拟/数字单元。13. The displacement detection device according to claim 10, wherein the analog/digital unit is a linear or non-linear analog/digital unit. 14.根据权利要求10所述的位移检测装置,该位移检测装置还包括光源,该光源用于照明所述表面。14. The displacement detection device according to claim 10, further comprising a light source for illuminating the surface. 15.一种位移检测装置,该位移检测装置包括:15. A displacement detection device, the displacement detection device comprising: 图像传感器,用于获取表面的图像以形成模拟图像,其中所述模拟图像具有平均亮度;an image sensor for acquiring an image of the surface to form a simulated image, wherein the simulated image has an average brightness; 数字/模拟单元,用于产生衰减值;Digital/analog unit for generating attenuation values; 加法单元,耦合所述图像传感器和所述数字/模拟单元,用于从所述模拟图像扣除所述衰减值;an addition unit, coupled to the image sensor and the digital/analog unit, for subtracting the attenuation value from the analog image; 非线性模拟/数字单元,将衰减后的模拟图像数字化;以及a non-linear analog/digital unit to digitize the attenuated analog image; and 数字信号处理器,比对数字化后的所述模拟图像与参考图像以形成位移量,并控制所述数字/模拟单元产生所述衰减值。A digital signal processor compares the digitized analog image with a reference image to form a displacement, and controls the digital/analog unit to generate the attenuation value. 16.根据权利要求15所述的位移检测装置,该位移检测装置还包括传输接口单元,该传输接口单元用于将所述位移量传输至图像显示装置。16. The displacement detection device according to claim 15, further comprising a transmission interface unit for transmitting the displacement to an image display device.
CN2008101894025A 2008-12-23 2008-12-23 Image processing method of displacement detection device and displacement detection device using the method Active CN101763175B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210184534.5A CN102854997B (en) 2008-12-23 2008-12-23 Image processing method for displacement detection device
CN2008101894025A CN101763175B (en) 2008-12-23 2008-12-23 Image processing method of displacement detection device and displacement detection device using the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101894025A CN101763175B (en) 2008-12-23 2008-12-23 Image processing method of displacement detection device and displacement detection device using the method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201210184534.5A Division CN102854997B (en) 2008-12-23 2008-12-23 Image processing method for displacement detection device

Publications (2)

Publication Number Publication Date
CN101763175A true CN101763175A (en) 2010-06-30
CN101763175B CN101763175B (en) 2013-07-03

Family

ID=42494368

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201210184534.5A Active CN102854997B (en) 2008-12-23 2008-12-23 Image processing method for displacement detection device
CN2008101894025A Active CN101763175B (en) 2008-12-23 2008-12-23 Image processing method of displacement detection device and displacement detection device using the method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201210184534.5A Active CN102854997B (en) 2008-12-23 2008-12-23 Image processing method for displacement detection device

Country Status (1)

Country Link
CN (2) CN102854997B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257722A (en) * 2012-02-20 2013-08-21 原相科技股份有限公司 Optical navigation device
CN111694447A (en) * 2019-03-11 2020-09-22 原相科技股份有限公司 Multimode optical navigation device and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9329702B2 (en) * 2013-07-05 2016-05-03 Pixart Imaging Inc. Navigational device with adjustable tracking parameter

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6859230B2 (en) * 2001-11-07 2005-02-22 Omnivision Technologies, Inc. Method of fast automatic exposure or gain control in a MOS image sensor
JP3783645B2 (en) * 2002-04-05 2006-06-07 株式会社日立製作所 Contrast adjustment method, contrast adjustment circuit, and video display device using the same
US20040100565A1 (en) * 2002-11-22 2004-05-27 Eastman Kodak Company Method and system for generating images used in extended range panorama composition
CN2643394Y (en) * 2003-07-04 2004-09-22 昆盈企业股份有限公司 Optical Pointing Device with Dimmable Illumination
JP4781013B2 (en) * 2005-05-30 2011-09-28 富士通セミコンダクター株式会社 Pixel signal processing apparatus and pixel signal processing method
KR100748858B1 (en) * 2005-11-24 2007-08-13 주식회사 메디슨 Image Processing System and Method for Improving Image Quality

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257722A (en) * 2012-02-20 2013-08-21 原相科技股份有限公司 Optical navigation device
CN111694447A (en) * 2019-03-11 2020-09-22 原相科技股份有限公司 Multimode optical navigation device and method

Also Published As

Publication number Publication date
CN101763175B (en) 2013-07-03
CN102854997A (en) 2013-01-02
CN102854997B (en) 2015-12-16

Similar Documents

Publication Publication Date Title
TWI397003B (en) Image processing method for optical navigator and optical navigator using the same
US9288369B2 (en) Displacement estimation method and displacement estimation device using the same
JP6525543B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
US11303820B2 (en) Light sensor chip and image processing device adaptable to low illumination environment
CN101763175B (en) Image processing method of displacement detection device and displacement detection device using the method
JPH11331592A (en) Image reader and computer readable storing medium
US9269148B2 (en) Displacement detection device
TWI507929B (en) Displacement detection device and power saving method thereof
TW201513669A (en) Image sensor and compensation method thereof
JP2008113337A (en) Imaging apparatus
JP2007336258A (en) Video signal processor and video signal processing method
JP2007336419A (en) Luminance conversion apparatus
JP6179207B2 (en) Image reading apparatus, image forming apparatus including image reading apparatus, and method for controlling image reading apparatus
JP5537995B2 (en) Image processing apparatus and image processing program
JP2000184201A (en) Method for forming digital image of low noise and image detection system therefor
JP2011087164A (en) Projector and projection image correcting program
CN102346571B (en) Displacement estimation method and displacement estimation device using the method
CN103513791B (en) Displacement detection device
JP2006236364A (en) Signal processing circuit and fingerprint detector using it
JP2010244537A (en) Image distortion correction method
JP5041056B2 (en) Imaging system and control device
CN102279655B (en) Displacement detection device and displacement detection method thereof
EP3245936A1 (en) Gain adjustment device, gain adjustment program, endoscope, and endoscope device
JP2005094513A (en) Original reader
JP4046044B2 (en) Imaging device

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