A lighting method and device for a code scanning machine includes the following steps: building a light source model; dividing a line light source into several sub light sources, and inputting the size, position, camera position and field of view of the sub light source into the light source model; outputting the lighting brightness of several sub light sources according to the data information of the light source model; illuminating and scanning the light source to the two-dimensional code of the circuit board, and scanning the camera Trace two-dimensional code; collect the current two-dimensional code illumination effect image; adjust the illumination brightness of several sub light sources according to the two-dimensional code illumination effect image, so as to make the brightness of the field of view average, and realize the difference of the brightness of each area irradiated on the two-dimensional code within the set range, so that the field of view brightness of the two-dimensional code can meet the scanning code identification operation of the camera. The invention adopts segmented sub light source, makes appropriate adjustment, realizes uniform illumination, and improves the recognition success rate when the camera scans the two-dimensional code.
【技术实现步骤摘要】
一种用于扫码机的照明方法及装置
本专利技术属于线路板上的二维码照明处理
,具体地说是一种用于扫码机的照明方法及装置。
技术介绍
随着二维码技术的发展,目前各行各业的产品,都将二维码融入其中,方便产品的跟踪。现有技术中,用线阵相机对PCB板二维码进行扫描,采用线型光源进行照明时,往往会出现中间亮两边暗的现象,导致扫描相机采集到的二维码图像的局部对比度较低,对二维码的精确识别造成影响,特别是相机视场边缘位置的二维码难以识别,以致于需要多次调整扫码,出现识别效率低的问题。
技术实现思路
本专利技术要解决的技术问题是提供一种用于扫码机的照明方法及装置。为了解决上述技术问题,本专利技术采取以下技术方案:一种用于扫码机的照明方法,包括以下步骤:构建光源模型;将线光源划分成若干个子光源,将子光源尺寸、位置、相机位置和视场大小输入光源模型中;光源模型根据数据信息输出若干个子光源的照明亮度;将光源照明向线路板的二维码照射扫描,相机扫描二维码;采集当前的二维码照明 ...
【技术保护点】
1.一种用于扫码机的照明方法,包括以下步骤:/n构建光源模型;/n将线光源划分成若干个子光源,将子光源尺寸、位置、相机位置和视场大小输入光源模型中;/n光源模型根据数据信息输出若干个子光源的照明亮度;/n将光源照明向线路板的二维码照射扫描,相机扫描二维码;/n采集当前的二维码照明效果图像;/n根据二维码照明效果图像,调整若干个子光源的照明亮度,使得视场的亮度平均,实现照射在二维码上的各区域的亮度的差异性维持在设定范围内,使得二维码的视场亮度满足相机的扫码辨识操作。/n
【技术特征摘要】
1.一种用于扫码机的照明方法,包括以下步骤:
构建光源模型;
将线光源划分成若干个子光源,将子光源尺寸、位置、相机位置和视场大小输入光源模型中;
光源模型根据数据信息输出若干个子光源的照明亮度;
将光源照明向线路板的二维码照射扫描,相机扫描二维码;
采集当前的二维码照明效果图像;
根据二维码照明效果图像,调整若干个子光源的照明亮度,使得视场的亮度平均,实现照射在二维码上的各区域的亮度的差异性维持在设定范围内,使得二维码的视场亮度满足相机的扫码辨识操作。
2.根据权利要求1所述用于扫码机的照明方法,其特征在于,所述对线光源划分若干个子光源时,沿着线光源的长度方向划分,并且线光源至少划分为3个子光源。
3.根据权利要求2所述用于扫码机的照明方法,其特征在于,所述线光源以非均匀长度不等分划分若干个子光源。
4.根据权利要求3所述用于扫码机的照明方法,...
【专利技术属性】
技术研发人员:许焕甦,麦青群,陈汉宇,张文化,
申请(专利权)人:广东斯玛特自动化科技有限公司,广东德尔智慧工厂科技有限公司,
类型:发明
国别省市:广东;44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。