zw版_Halcon-delphi系列教程_卫星航拍精确打击目标自动识别

《zw版·Halcon-delphi系列原创教程》 卫星航拍精确打击目标自动识别

      这几天,俄罗斯空军在叙利亚大显神威,美军有意见了,说俄罗斯是狂轰滥炸,不是精确打击。
      不过,战斗民族也是会进化的,第二天,俄罗斯就show出了精确打击的航拍视频。

       精确打击,看起来,高大上,不过,对于今天的机器视觉而言,非常简单。
        下面示例的脚本,才30多行,虽然不长,
       不过,无人机,卫星遥感、航拍等,相关功能,核心代码,也就是这些代码。

 

        图1,是飞机卫星航拍照片
       图2,是首轮目标范围筛选,可以看到有很多细小的感染源,还有几个大型的建筑区域,需要过滤
       图3,是最终的识别结果,相关非常不错,该要的区域都在
      图4,建筑物分割图,脚本演示的是tree树、植被的的识别,所以,作为军用,打击目标的筛选,需要对图4,进行二次过滤。

       这个脚本,略微修改,配合长时间的连续图像分析。
       就可用于森林数目、农作物,草原植被、甚至动物。鸟类种群、迁徙、活动等方面的分析
       例如,农作物产量推算,鸟类迁徙路线,动物活动区域等等,

       ps,有兴趣的网友,可以自己改为delphi、vc、vb版

  

 1 dev_close_window ()
 2 read_image (Mreut, 'mreut_y')
 3 read_image (MreutDem, 'mreut_dgm_2.0')
 4 get_image_size (Mreut, Width, Height)
 5 dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
 6 get_system ('clip_region', Information)
 7 set_system ('clip_region', 'false')
 8 dev_set_draw ('margin')
 9 dev_set_color ('red')
10 * do texture segmentation
11 texture_laws (Mreut, ImageTexture, 'ee', 2, 5)
12 median_separate (ImageTexture, ImageSMedian, 25, 25, 'mirrored')
13 threshold (ImageSMedian, TexturedRegion, 30, 255)
14 dev_display (Mreut)
15 dev_display (TexturedRegion)
16 disp_continue_message (WindowHandle, 'black', 'true')
17 stop ()
18 * find high objects
19 scale_image_max (MreutDem, ImageScaleMax)
20 dual_rank (ImageScaleMax, ImageRank, 'circle', 15, 10, 'mirrored')
21 sub_image (ImageScaleMax, ImageRank, ImageSubRank, 1, 0)
22 threshold (ImageSubRank, High, 5, 255)
23 zoom_region (High, HighLarge, 8, 8)
24 move_region (HighLarge, HighLargeMoved, -250, -600)
25 clip_region (HighLargeMoved, HighClipped, 0, 0, 511, 511)
26 threshold (Mreut, Dark, 0, 130)
27 intersection (TexturedRegion, Dark, RegionIntersection)
28 fill_up (RegionIntersection, RegionFillUp)
29 connection (RegionFillUp, ConnectedRegions)
30 select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 250, 10000000)
31 closing_circle (SelectedRegions, TexureAndHigh, 2.5)
32 dev_display (Mreut)
33 dev_display (TexureAndHigh)
34 set_system ('clip_region', Information)

 



【《zw版·Halcon-delphi系列原创教程》,网址,cnblogs.com/ziwang/】

posted @ 2015-10-06 10:36  统领  阅读(1059)  评论(0编辑  收藏  举报