- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
自己总结ccd算法(I summarize the CCD algorithm)
自己总结ccd算法(I summarize the CCD algorithm)
From the first effective pixels left (usful_line) began to turn on the adjacent pixel gray-scale subtraction (left minus right), when the difference between the two is greater than the threshold (VALUE), to determine the next pixel (usful_line+1) corresponding to the left edge of the black line, continue to subtract when difference again is greater than the threshold, will the right edge of the pixel location of the black line, the procedures are as follows:
/ / program features for the absolute value of the difference between two numbers, black algorithm preparation procedures
Unsigned, char, AbsSub (unsigned, char, N1, unsigned, char, N2)
{
Unsigned char dif = 0;
If (N1 N2)
{
DIF = N1 - n2;
}
Else
{
DIF = N2 - n1;
}
Return dif;
}
*
* g_ucDif is the absolute value of the difference between the two gray values of the pixel
* LINE_MAX is the maximum valid number of images to be collected
* ROW_MAX is the maximum number of valid rows for the image to be acquired
* ucImage_data[][] is a two-dimensional array for storing image pixels
* ucImage_temp is an array of temporary storage images
* /
For (us_row = 0; us_row ROW_MAX; us_row++)
{
/ / scan of the image was collected for each
For (us_line = 0; us_line LINE_MAX-1; / / us_line++) to determine the left edge of the black line
{
G_ucDif = AbsSub (ucImage_data[us_row][us_line], ucImage_temp);
If (g_ucDif DIFFVAL)
{
Left = us_line;
Reght = LINE_MAX-1;
For (line1=left; line1LINE_MAX-1; / / line1++) determine the right edge line
{
G_ucDif = AbsSub (ucImage_data[us_row][left], ucImage_data[us_row][line1+1]);
If (g_ucDif VALUE)
{
Right = line1;
Break;
}
}
}
}
}
Scan the image to black cross line
Through the AD conversion of each line image can be collected 70 valid data points, and the line width is only 25mm, in this range can only contain 6 valid data, so we as long as the right edge of the black (right) where the number of columns and the left edge (left) where the number of colu
您可能关注的文档
- 电缆工程工程量计算规则(Rules for calculation of quantities of cable engineering).doc
- 电脑主板电容好坏测量以及电容替换介绍(Computer motherboard capacitance measurement and capacitor replacement introduced).doc
- 电能计量中心集约化(Intensification of electric energy metering center).doc
- 电缆导体截面积与载流量的计算及截面的优化选择(Calculation of sectional area and Ampacity of cable conductor and optimum selection of cross section).doc
- 电脑主机前面的耳麦插口没声音了(The host computer in front of the headset jack no sound).doc
- 电线电缆知识30问答(Wire & cable knowledge 30 Q & A).doc
- 电脑在关机时自动清理垃圾文件(The computer automatically clean the junk files when it is turned off).doc
- 电气初试科目(Electrical preliminary examination).doc
- 电脑电源各线电压(Line voltage of computer power supply).doc
- 电脑电源线颜色详解(Computer power line color detail).doc
- 自考历年领导科学案例题汇总(Summary of leading scientific cases in China).doc
- 自考国际商务谈判资料串讲(Data from the international business negotiations Chuanjiang).doc
- 自考资料文本文档(Self examination data text document).doc
- 自行创业有什么策管理略 (What are the management strategies for self employment).doc
- 著名erp失败案例分析(Case study of famous ERP failures).doc
- 装企商业模式第十七卷第三章第三节(Business model seventeenth volume, the third chapter, the third section).doc
- 著名思想实验十例(Ten famous experiments).doc
- 装修材料计算简易方法(Simple calculation method of decoration materials).doc
- 装修材料进门验收注意事项(Decoration materials into the door acceptance notes).doc
- 装修材料明细(Details of decoration materials).doc
文档评论(0)