CN110726425B - 一种单圈绝对式光电码盘的图像式译码方法 - Google Patents

一种单圈绝对式光电码盘的图像式译码方法 Download PDF

Info

Publication number
CN110726425B
CN110726425B CN201910972766.9A CN201910972766A CN110726425B CN 110726425 B CN110726425 B CN 110726425B CN 201910972766 A CN201910972766 A CN 201910972766A CN 110726425 B CN110726425 B CN 110726425B
Authority
CN
China
Prior art keywords
coding
code
stripes
decoding
stripe
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.)
Active
Application number
CN201910972766.9A
Other languages
English (en)
Other versions
CN110726425A (zh
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.)
Institute of Optics and Electronics of CAS
Original Assignee
Institute of Optics and Electronics of CAS
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 Institute of Optics and Electronics of CAS filed Critical Institute of Optics and Electronics of CAS
Priority to CN201910972766.9A priority Critical patent/CN110726425B/zh
Publication of CN110726425A publication Critical patent/CN110726425A/zh
Application granted granted Critical
Publication of CN110726425B publication Critical patent/CN110726425B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/26Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • G01D5/32Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light
    • G01D5/34Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells
    • G01D5/347Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells using displacement encoding scales
    • G01D5/3473Circular or rotary encoders
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D3/00Indicating or recording apparatus with provision for the special purposes referred to in the subgroups
    • G01D3/028Indicating or recording apparatus with provision for the special purposes referred to in the subgroups mitigating undesired influences, e.g. temperature, pressure
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/26Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • G01D5/32Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light
    • G01D5/34Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells
    • G01D5/347Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells using displacement encoding scales
    • G01D5/34707Scales; Discs, e.g. fixation, fabrication, compensation
    • G01D5/34715Scale reading or illumination devices

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)
  • Optical Transform (AREA)

Abstract

本发明公开了一种单圈绝对式光电码盘的图像式译码方法,该方法结合光电编码器单圈编码技术和CCD图像测量方式,通过图像处理算法对获取的码盘图案进行灰度化、滤波、二值化等处理后得到较清晰的黑白编码条纹,将条纹经过软件译码算法,首先找到一条条纹的宽度作为基准,其次依靠基准值进行条纹图案的分割,分割后的条纹根据黑白颜色和同种颜色所占的宽度翻译为“0”“1”表示的编码,在与单圈编码方式对应的译码表中搜寻“01”编码的绝对位置,最后加上细分部分的编码得到精确的位移或角度信息。本发明提出了光电码盘详细的基于图像处理的译码方式,不同于传统的光电编码器,它采用软件译码算法代替硬件电路译码,有效减少电路空间。

Description

一种单圈绝对式光电码盘的图像式译码方法
技术领域
本发明属于光电技术领域,具体涉及一种单圈绝对式光电码盘的图像式译码方法。
背景技术
从莫尔条纹的发现到数字计算机及数字系统的发展,以及激光的问世和应用,光电位移精密测量技术得到迅速发展,各种光栅传感器被广泛应用,高精度的光栅计量测试仪器设备大量应用于各个领域中。在机械和电子集成领域的产品已经被大规模应用,同时被广泛应用于国防、工业、生物工程和科技领域的精密测量和实时控制系统中,它是高精度机器中必不可少的精密测量仪器。
传统绝对式编码器是利用光栅测量,主要根据光从码盘的一侧照射在另一侧接受码盘的透光信息,通过透光/不透光情况来获得角度位置信息。但是随着分辨率要求越来越高,在圆盘一周内刻划的划线也越来越多,越来越密级,划线的宽度也会相应越来越细,然而过细的划线会造成光线不能顺利的通过,导致透光亮不足,透光区域和不透光区域的区分产生困难,另一方面划线距离小形成狭缝,易产生衍射现象导致信号串扰。
为了解决码盘尺寸和分辨率这一对矛盾,提出引入图像传感器运用在光电编码器中,使用图像传感器接受码盘编码图案,先读取粗码,再利用传感器像素的空间均匀性进行细分,运用该技术可以在原有编码方式不改变的前提下提高分辨率,采用成像的方式,同时简化了码盘的安装和调节。半导体技术不断发展,CCD、CMOS图像传感器等技术日趋成熟,为光电编码器的进一步发展提供了新的技术,因此图像式光电编码器是未来探究的新的方向,具有重要的应用意义。
发明内容
本发明的目的在于提出一种单圈绝对式光电码盘的图像式译码方法,利用图像传感器获取码盘图像,通过图像处理算法进行译码。该方法具体实现了光电轴角编器码盘的图像式译码算法,算法简单可行,易操作,有实际应用价值,能提高译码精度。
本发明采用的技术方案为:一种单圈绝对式光电码盘的图像式译码方法,包括以下步骤:
步骤(一):用带有CCD摄影功能的器件获取单圈编码盘局部图像;
步骤(二):将获取的多组条码图案进行图像处理,得到较清晰的二值化黑白条纹图形;
步骤(三):将二值化图像通过译码算法,确定编码单位码元,用作粗码译码的基准,最终将按一定编码顺序排列的黑白条纹翻译为用“01”表示的数字编码;
步骤(四):在译码表中搜寻相应数字编码对应的绝对位置信息,绝对位置乘上码盘的刻画精度得到粗码值;
步骤(五):根据视场中的边缘条码进行细分,提高译码精度,得到精码值;
步骤(六):粗码值加上精码值得到精确的译码值,精码与粗码的衔接;
其中,通过摄影拍摄的方式获得单圈编码盘局部图像,拍摄时要保证变量唯一,只是码盘在朝着固定方向移动,其他条件不变。
其中,拍摄码盘上的编码条纹时,视场中包含的条纹数要远大于编码位数,以此保证后续作为基准的编码单位码元的确定。
其中,图像处理经过灰度化、滤波、二值化的过程,减少图像采集过程中由于光照条件等影响产生的干扰噪声,得到黑白边缘分明的编码条纹。
其中,译码算法需要确定编码单位码元,也就是一条标准条码宽度,所占像素值记为n。由于拍摄的一幅图像中包含的条纹数是远远大于码盘的编码位数,因此将这些条纹中最细的一条作为标准条码。
其中,寻找视场最细条码需要统计整个图像中相邻不同颜色条纹所占的像素值,存储在number数组中,由于最前和最后这两部分的条纹可能包含不完整的单位码元,单位码元宽度确定过程中会受此影响,因此这两部分不纳入计算。
其中,条码分割方法,当两个及以上相同颜色的条纹相邻排列时组合成一条较宽的条纹,如宽度累积像素值为n1,这个较宽条纹中包含的标准条纹个数为n1/n,将得出的值存储到streak数组中。
其中,用“0”表示一条黑色标准条纹,用“1”表示一条白色标准条纹,“0”和“1”的数值按照streak数组中的数值确定,得到相应编码图像的译码粗值,由“0”“1”组成的数字编码。
其中,译码表中绝对位置信息和数字编码一一对应,利用“0”“1”编码到译码表中搜寻,得到对应的绝对位置,如编码盘移动前后译码得到的绝对位置分别为α1和α2,编码盘的分辨力为m,那么移动距离的粗码测量值为(α21)*m。
其中,细分距离是确定与边缘条纹的宽度与标准条纹宽度的比值β,细分值可以表示为β*m。
其中,根据编码盘移动的方向,确定粗码与精码的结合方式是加还是减,得到最后精确的译码值。
本发明与现有技术相比的优点在于:
(1)该方法采用软件译码算法代替硬件电路译码,有效减少电路空间。
(2)该方法基于当下流行的图像传感技术,符合光电编码器向着小型化、高精度发展的趋势。
(3)该方法可操作性强,算法简单可行。
附图说明
图1为位码盘局部条码图案示意图,其中,1为图像探测器;
图2为图像处理二值化效果图;
图3为单圈绝对编码十六位译码表;
图4为译码示意图;
图5为本发明一种单圈绝对式光电码盘的图像式译码方法的流程图。
具体实施方式
以下结合附图,具体说明本发明的实施方式。
本发明是一种单圈绝对式光电码盘的图像式译码方法,其译码具体实现步骤如下:
步骤(1):通过CCD摄影拍摄的方式获得单圈编码盘局部图像,拍摄时要保证变量唯一,只是码盘在朝着固定方向移动,其他条件不变,拍摄码盘上的编码条纹时,视场中包含的条纹数要远大于编码位数,如图2所示,一幅图像中包含的条码数远远大于8。
步骤(2):图像处理经过灰度化、滤波、二值化的过程,减少图像采集过程中由于光照条件等影响产生的干扰噪声,得到黑白边缘分明的编码条纹,如图2。
步骤(3):确定编码单位码元,也就是一条标准条码宽度,所占像素值记为n。由于拍摄的一幅图像中包含的条纹数是远远大于码盘的编码位数,因此将这些条纹中最细的一条作为标准条码。
步骤(4):寻找视场最细条码需要统计整个图像中相邻不同颜色条纹所占的像素值,存储在number数组中,由于最前和最后这两部分的条纹可能包含不完整的单位码元,单位码元宽度确定过程中会受此影响,因此这两部分不纳入计算。
步骤(5):条码分割方法,当两个及以上相同颜色的条纹相邻排列时组合成一条较宽的条纹,如宽度累积像素值为n1,这个较宽条纹中包含的标准条纹个数为n1/n,将得出的值存储到streak数组中。
步骤(6):用“0”表示一条黑色标准条纹,用“1”表示一条白色标准条纹,“0”和“1”的数值按照streak数组中的数值确定,得到相应编码图像的译码粗值,由“0”“1”组成的数字编码,如图4所示。
步骤(7):译码表中绝对位置信息和数字编码一一对应,利用“0”“1”编码到译码表中搜寻,8位编码的译码表如图3所示,得到对应的绝对位置,如编码盘移动前后译码得到的绝对位置分别为α1和α2,编码盘的分辨力为m,那么移动距离的粗码测量值为(α21)*m。
步骤(8):细分距离是确定与边缘条纹的宽度与标准条纹宽度的比值β,细分值可以表示为β*m,根据编码盘移动的方向,确定粗码与精码的结合方式是加还是减,得到最后精确的译码值。

Claims (1)

1.一种单圈绝对式光电码盘的图像式译码方法,其特征在于:包括以下步骤:
步骤(1):通过CCD摄影拍摄的方式获得单圈编码盘局部图像,拍摄时要保证变量唯一,只是码盘在朝着固定方向移动,其他条件不变,拍摄码盘上的编码条纹时,视场中包含的条纹数要远大于编码位数;
步骤(2):图像处理经过灰度化、滤波、二值化的过程,减少图像采集过程中由于光照条件影响产生的干扰噪声,得到黑白边缘分明的编码条纹;
步骤(3):确定编码单位码元,也就是一条标准条码宽度,所占像素值记为n,由于拍摄的一幅图像中包含的条纹数是远远大于码盘的编码位数,因此将这些条纹中最细的一条作为标准条码;
步骤(4):寻找视场最细条码需要统计整个图像中相邻不同颜色条纹所占的像素值,存储在number数组中,由于最前和最后这两部分的条纹可能包含不完整的单位码元,单位码元宽度确定过程中会受此影响,因此这两部分不纳入计算;
步骤(5):条码分割方法,当两个及以上相同颜色的条纹相邻排列时组合成一条较宽的条纹,如宽度累积像素值为n1,这个较宽条纹中包含的标准条纹个数为n1/n,将得出的值存储到streak数组中;
步骤(6):用“0”表示一条黑色标准条纹,用“1”表示一条白色标准条纹,“0”和“1”的数值按照streak数组中的数值确定,得到相应编码图像的译码粗值,由“0”“1”组成的数字编码;
步骤(7):译码表中绝对位置信息和数字编码一一对应,利用“0”“1”编码到译码表中搜寻,得到对应的绝对位置,如编码盘移动前后译码得到的绝对位置分别为α1和α2,编码盘的分辨力为m,那么移动距离的粗码测量值为(α21)*m;
步骤(8):细分距离是确定与边缘条纹的宽度与标准条纹宽度的比值β,细分值可以表示为β*m,根据编码盘移动的方向,确定粗码与精码的结合方式是加还是减,得到最后精确的译码值。
CN201910972766.9A 2019-10-14 2019-10-14 一种单圈绝对式光电码盘的图像式译码方法 Active CN110726425B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910972766.9A CN110726425B (zh) 2019-10-14 2019-10-14 一种单圈绝对式光电码盘的图像式译码方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910972766.9A CN110726425B (zh) 2019-10-14 2019-10-14 一种单圈绝对式光电码盘的图像式译码方法

Publications (2)

Publication Number Publication Date
CN110726425A CN110726425A (zh) 2020-01-24
CN110726425B true CN110726425B (zh) 2022-10-21

Family

ID=69221163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910972766.9A Active CN110726425B (zh) 2019-10-14 2019-10-14 一种单圈绝对式光电码盘的图像式译码方法

Country Status (1)

Country Link
CN (1) CN110726425B (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111811562B (zh) * 2020-07-22 2021-04-20 中国科学院长春光学精密机械与物理研究所 一种基于微控制器的增量式光电编码器精粗校正方法
CN112129231A (zh) * 2020-09-23 2020-12-25 中国科学院长春光学精密机械与物理研究所 一种用于二维平面位移测量的处理电路
CN113111675B (zh) * 2021-04-19 2021-10-12 广州讯宝电子科技有限公司 一种基于扫码器的快速识别条码的方法及系统
CN116858134B (zh) * 2023-07-07 2023-12-05 北京控制工程研究所 一种高精度光电角位移传感器位置解算方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1264001C (zh) * 2003-10-10 2006-07-12 杨俊志 一种采用通用编码方法的单圈绝对式角度编码器
JP4885630B2 (ja) * 2006-07-05 2012-02-29 株式会社ミツトヨ 二次元エンコーダ、及び、そのスケール
CN102322882A (zh) * 2011-06-02 2012-01-18 浙江大学 基于阵列探测器的绝对轴角编码系统
CN103134532B (zh) * 2013-02-07 2015-01-21 大连民族学院 一种基于绝对位置判定的圆周码道编解码方法

Also Published As

Publication number Publication date
CN110726425A (zh) 2020-01-24

Similar Documents

Publication Publication Date Title
CN110726425B (zh) 一种单圈绝对式光电码盘的图像式译码方法
US9945698B2 (en) Macro-micro composite grating ruler measuring system and measuring method using same comprising a macro-scale reading module, a micro-scale reading module and a measuring reference line
CN106017520B (zh) 一种绝对式光电编码器编码方法及实施该方法的编码器
CN103759749B (zh) 一种单码道绝对式位置编码器
CN104197861B (zh) 基于结构光灰度向量的三维数字成像方法
CN109344676B (zh) 一种基于哈希算法的自动感应触发方法及其系统
CN100368767C (zh) 基于光栅投影的二维图像区域定位方法
CN104864809B (zh) 一种基于视觉的位置检测编码靶标及系统
US6809666B1 (en) Circuit and method for gray code to binary conversion
WO1984001027A1 (en) Position measuring apparatus
CN110207596B (zh) 一种图像编码方法、光栅尺测量装置和测量方法
JP2006226987A (ja) 光電式エンコーダ、及び、そのスケール
CN102095439B (zh) 单码道绝对位置编码方法、解码方法及测量装置
KR20070114648A (ko) 평면 바코드 및 그의 코딩-디코딩 방법
CN110006366B (zh) 一种图像反射式的角位移测量装置及其方法
CN108955573B (zh) 一种编码结构光的阶次无损校正方法
US7158690B2 (en) Enhancing the resolution of measurement systems employing image capturing systems to measure lengths
WO2017125507A1 (en) Imaging unit and system for obtaining a three-dimensional image
CN110617770B (zh) 基于位置编码的位移检测系统及检测方法
CN105526871A (zh) 基于cmos的光栅位移测量系统及其测量方法
GB2353421A (en) Determining the position between two parts which move relative to each other
CN107525471A (zh) 二维绝对式编码三自由度运动平台测量系统
CN113984094B (zh) 一种绝对值编码器的解码方法、设备、介质及产品
CN105674893B (zh) 基于cmos图像传感器的绝对式光栅尺及其测量方法
JP4885630B2 (ja) 二次元エンコーダ、及び、そのスケール

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant