measure_bga_dff

* This program reconstructs the height of a single solder
* ball on a BGA using depth from focus.

dev_update_off ()
dev_close_window ()
read_image (Image, 'dff/focus_bga_37')
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_set_paint ('default')
dev_display (Image)

* Read the sequence of images
disp_message (WindowHandle, 'Read a sequence of focus images ...', 'image', 20, 20, 'white', 'false')
Sequence := [37:-1:1]
Names := 'dff/focus_bga_' + Sequence$'02'
read_image (ImageArray, Names)
channels_to_image (ImageArray, Image)
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
for Index := 1 to 37 by 1
    access_channel (Image, ImageDisp, Index)
    dev_display (ImageDisp)
    disp_message (WindowHandle, 'DFF sequence of solder ball: image ' + Index$'02', 'image', 20, 20, 'white', 'false')
    wait_seconds (0.05)
endfor

* Compute the depth map and display results
dev_display (ImageDisp)
disp_message (WindowHandle, 'Compute the depth map', 'image', 20, 20, 'white', 'false')
depth_from_focus (Image, Depth, Confidence, ['bandpass',3,3], 'next_maximum')
scale_image_max (Depth, DepthScaleMax)
select_grayvalues_from_channels (Image, Depth, Sharp)
scale_image (Sharp, ImageScaled, 8, 0)
compose2 (DepthScaleMax, ImageScaled, MultiChannelImage)
dev_clear_window ()
dev_set_paint (['3d_plot','texture'])
dev_display (MultiChannelImage)
disp_message (WindowHandle, '3D reconstruction of a solder ball on a bga', 'image', 20, 280, 'white', 'false')

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

electrical1024

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值