Hello Mat

 找回密码
 立即注册
查看: 8304|回复: 7

频域自相关变换

[复制链接]

1294

主题

1520

帖子

110

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22633
发表于 2020-2-20 17:55:09 | 显示全部楼层 |阅读模式
频域自相关变换
  1. * 使用自相关频域分析法分析wafer上的单个die的位置
  2. * wafer是一种特殊的结构,相同的die重复出现的一个晶圆
  3. *
  4. dev_update_off ()
  5. read_image (Wafer, 'wafer/wafer_dies')
  6. get_image_size (Wafer, Width, Height)
  7. dev_close_window ()
  8. dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
  9. dev_display (Wafer)
  10. *
  11. * Compute the auto-correlation of the wafer image
  12. * 时域到频域
  13. rft_generic (Wafer, ImageFFT, 'to_freq', 'n', 'complex', Width)
  14. correlation_fft (ImageFFT, ImageFFT, ImageCorrelation)
  15. * 频域到时域
  16. rft_generic (ImageCorrelation, ImageFFTInv, 'from_freq', 'n', 'real', Width)
  17. *
  18. * 计算相连dies之间的位置
  19. local_max_sub_pix (ImageFFTInv, 'gauss', 3, 0.0001, Row, Column)
  20. *
  21. * 绘制第5个die到第6个die的距离图,第5个die到第9个die的距离图
  22. I0 := 5
  23. I1 := 6
  24. I2 := 9
  25. gen_arrow_contour_xld (Arrow, subset(Row,[I0,I0]), subset(Column,[I0,I0]), subset(Row,[I1,I2]), subset(Column,[I1,I2]), 15, 15)
  26. gen_cross_contour_xld (Cross, Row, Column, 20, rad(45))
  27. distance_pp (Row[I0], Column[I0], Row[I1], Column[I1], DistHor)
  28. distance_pp (Row[I0], Column[I0], Row[I2], Column[I2], DistVert)
  29. *
  30. * Display the results
  31. dev_display (Wafer)
  32. disp_message (WindowHandle, ['Auto-correlation of the wafer image...','...corresponds to the die pitch'], 'image', 12, 12, 'black', 'true')
  33. dev_set_color ('yellow')
  34. dev_display (Arrow)
  35. disp_message (WindowHandle, DistHor$ '.2f' + ' px', 'image', Row[I0] - 25, (Column[I0] + Column[I1]) * .5 - 50, 'yellow', 'false')
  36. disp_message (WindowHandle, DistVert$ '.2f' + ' px', 'image', (Row[I2] + Row[I0]) * .5 - 15, Column[I0] - 100, 'yellow', 'false')
  37. dev_set_color ('green')
  38. dev_display (Cross)
复制代码



参考:
【1】Halcon 例程学习之频域自相关变换( correlation_fft)
【2】仿射变换:水平矫正



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-4-23 15:50 , Processed in 0.253037 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表