当前位置: 首页 > news >正文

wordpress知更鸟主题怎么用如何做网站搜索引擎优化

wordpress知更鸟主题怎么用,如何做网站搜索引擎优化,广东同江医院网站建设,网站的ppt方案怎么做第一,Brenner梯度法、 第二,Tenegrad梯度法、 第三,laplace梯度法、 第四,方差法、 第五,能量梯度法。 此实例通过使用Halcon实现5种清晰度算法函数: 1. 方差算法函数; 2. 拉普拉斯能量函数…

第一,Brenner梯度法、

第二,Tenegrad梯度法、

第三,laplace梯度法、

第四,方差法、

第五,能量梯度法。

此实例通过使用Halcon实现5种清晰度算法函数:
1. 方差算法函数;
2. 拉普拉斯能量函数;
3. 能量梯度函数;
4. Brenner函数;
5. Tenegrad函数;
测试效果如下图片;找到峰值对应的那张图,确实是最清晰的那张;使用直方图显示清晰度结果,如果有更好的方法,那就跟帖回复吧。
此实例有HalconBBS群友提供!
 
 
 
*evaluate_definition的使用例子
*使用halcon自带的图片
*实现了五种评价函数,
*选择算子的Method值,可以观察不同评价函数的效果。
read_image (Image, 'pcb_focus/pcb_focus_telecentric_106')
dev_update_off ()
dev_close_window ()
dev_open_window_fit_image (Image, 0, 0, 752, 480, WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_set_color ('lime green')
dev_set_line_width (3)
Ret:=[]
get_image_size(Image, Width, Height)
for Index := 1 to 121 by 1
    read_image (Image, 'pcb_focus/pcb_focus_telecentric_'+Index$'03d')
    
    evaluate_definition (Image, 'Tenegrad', Value)
    
    dev_display (Image)
    Ret:=[Ret,Value]
endfor
*使用直方图显示清晰度结果,如果有更好的方法,那就跟帖回复吧
VMax:=max(Ret)
VMin:=min(Ret)
GRet := 100*(Ret-VMin)/(VMax-VMin)
gen_region_histo(Region, Ret, 255, 255, 1)
*找到峰值对应的那张图,确实是最清晰的那张。
qxd:=find(Ret, max(Ret))
read_image (GoodImage, 'pcb_focus/pcb_focus_telecentric_'+qxd$'03d')
dev_display (GoodImage)
dev_display (Region)
evaluate_definition函数代码如下:

scale_image_max(Image, Image)
get_image_size(Image, Width, Height)if(Method = 'Deviation')
*方差法region_to_mean (Image, Image, ImageMean) convert_image_type (ImageMean, ImageMean, 'real')convert_image_type (Image, Image, 'real') sub_image(Image, ImageMean, ImageSub, 1, 0)mult_image(ImageSub, ImageSub, ImageResult, 1, 0)intensity(ImageResult, ImageResult, Value, Deviation) elseif(Method = 'laplace')
*拉普拉斯能量函数laplace (Image, ImageLaplace4, 'signed', 3, 'n_4')laplace (Image, ImageLaplace8, 'signed', 3, 'n_8')add_image(ImageLaplace4,ImageLaplace4,ImageResult1, 1, 0)add_image(ImageLaplace4,ImageResult1,ImageResult1, 1, 0)add_image(ImageLaplace8,ImageResult1,ImageResult1, 1, 0)mult_image(ImageResult1, ImageResult1, ImageResult, 1, 0)intensity(ImageResult, ImageResult, Value, Deviation)elseif(Method = 'energy')
*能量梯度函数crop_part(Image, ImagePart00, 0, 0, Width-1, Height-1)crop_part(Image, ImagePart01, 0, 1, Width-1, Height-1)crop_part(Image, ImagePart10, 1, 0, Width-1, Height-1)convert_image_type (ImagePart00, ImagePart00, 'real')convert_image_type (ImagePart10, ImagePart10, 'real')convert_image_type (ImagePart01, ImagePart01, 'real')sub_image(ImagePart10, ImagePart00, ImageSub1, 1, 0)mult_image(ImageSub1, ImageSub1, ImageResult1, 1, 0)sub_image(ImagePart01, ImagePart00, ImageSub2, 1, 0)mult_image(ImageSub2, ImageSub2, ImageResult2, 1, 0)add_image(ImageResult1, ImageResult2, ImageResult, 1, 0)    intensity(ImageResult, ImageResult, Value, Deviation)
elseif(Method = 'Brenner')
*Brenner函数法crop_part(Image, ImagePart00, 0, 0, Width, Height-2)convert_image_type (ImagePart00, ImagePart00, 'real')crop_part(Image, ImagePart20, 2, 0, Width, Height-2)convert_image_type (ImagePart20, ImagePart20, 'real')sub_image(ImagePart20, ImagePart00, ImageSub, 1, 0)mult_image(ImageSub, ImageSub, ImageResult, 1, 0)intensity(ImageResult, ImageResult, Value, Deviation)
elseif(Method = 'Tenegrad')
*Tenegrad函数法sobel_amp (Image, EdgeAmplitude, 'sum_sqrt', 3)min_max_gray(EdgeAmplitude, EdgeAmplitude, 0, Min, Max, Range)threshold(EdgeAmplitude, Region1, 11.8, 255)region_to_bin(Region1, BinImage, 1, 0, Width, Height)mult_image(EdgeAmplitude, BinImage, ImageResult4, 1, 0)mult_image(ImageResult4, ImageResult4, ImageResult, 1, 0)intensity(ImageResult, ImageResult, Value, Deviation)elseif(Method = '2')elseif(Method = '3')endifreturn ()

scale_image_max(Image, Image)
get_image_size(Image, Width, Height)

if(Method = 'Deviation')
*方差法
    region_to_mean (Image, Image, ImageMean) 
    convert_image_type (ImageMean, ImageMean, 'real')
    convert_image_type (Image, Image, 'real') 
    sub_image(Image, ImageMean, ImageSub, 1, 0)
    mult_image(ImageSub, ImageSub, ImageResult, 1, 0)
    intensity(ImageResult, ImageResult, Value, Deviation) 
    
elseif(Method = 'laplace')
*拉普拉斯能量函数
    laplace (Image, ImageLaplace4, 'signed', 3, 'n_4')
    laplace (Image, ImageLaplace8, 'signed', 3, 'n_8')
    add_image(ImageLaplace4,ImageLaplace4,ImageResult1, 1, 0)
    add_image(ImageLaplace4,ImageResult1,ImageResult1, 1, 0)
    add_image(ImageLaplace8,ImageResult1,ImageResult1, 1, 0)
    mult_image(ImageResult1, ImageResult1, ImageResult, 1, 0)
    intensity(ImageResult, ImageResult, Value, Deviation)

elseif(Method = 'energy')
*能量梯度函数
    crop_part(Image, ImagePart00, 0, 0, Width-1, Height-1)
    crop_part(Image, ImagePart01, 0, 1, Width-1, Height-1)
    crop_part(Image, ImagePart10, 1, 0, Width-1, Height-1)
    convert_image_type (ImagePart00, ImagePart00, 'real')
    convert_image_type (ImagePart10, ImagePart10, 'real')
    convert_image_type (ImagePart01, ImagePart01, 'real')
    sub_image(ImagePart10, ImagePart00, ImageSub1, 1, 0)
    mult_image(ImageSub1, ImageSub1, ImageResult1, 1, 0)
    sub_image(ImagePart01, ImagePart00, ImageSub2, 1, 0)
    mult_image(ImageSub2, ImageSub2, ImageResult2, 1, 0)
    add_image(ImageResult1, ImageResult2, ImageResult, 1, 0)    
    intensity(ImageResult, ImageResult, Value, Deviation)
elseif(Method = 'Brenner')
*Brenner函数法
    crop_part(Image, ImagePart00, 0, 0, Width, Height-2)
    convert_image_type (ImagePart00, ImagePart00, 'real')
    crop_part(Image, ImagePart20, 2, 0, Width, Height-2)
    convert_image_type (ImagePart20, ImagePart20, 'real')
    sub_image(ImagePart20, ImagePart00, ImageSub, 1, 0)
    mult_image(ImageSub, ImageSub, ImageResult, 1, 0)
    intensity(ImageResult, ImageResult, Value, Deviation)
elseif(Method = 'Tenegrad')
*Tenegrad函数法
    sobel_amp (Image, EdgeAmplitude, 'sum_sqrt', 3)
    min_max_gray(EdgeAmplitude, EdgeAmplitude, 0, Min, Max, Range)
    threshold(EdgeAmplitude, Region1, 11.8, 255)
    region_to_bin(Region1, BinImage, 1, 0, Width, Height)
    mult_image(EdgeAmplitude, BinImage, ImageResult4, 1, 0)
    mult_image(ImageResult4, ImageResult4, ImageResult, 1, 0)
    intensity(ImageResult, ImageResult, Value, Deviation)
   
elseif(Method = '2')

elseif(Method = '3')
    
endif
    
return ()

http://www.mmbaike.com/news/44957.html

相关文章:

  • 找客源用哪个软件好余姚网站如何进行优化
  • 做海报需要用到什么网站素材网络营销推广的5种方法
  • 做网站需要投入多少钱百度广告推广
  • 客户管理系统crm人教版优化设计电子书
  • html查询网站制作培训机构退费纠纷一般怎么解决
  • 利用vps做网站查询网入口
  • 做网站必要吗百度推广有效果吗?
  • 定州网站建设开发网站的公司
  • wordpress一栏多图北京优化seo排名优化
  • 合肥商城网站建设多少钱网络营销环境分析包括哪些内容
  • 建立网站专栏今天有哪些新闻
  • 做网站虚拟主机推荐什么是电商平台推广
  • 做趣味图形的网站成都最新疫情
  • wordpress免登录发文章seo整站网站推广优化排名
  • 第三次网站建设的通报网络营销推广外包服务
  • 怎么可以自己做网站被百度收到如何注册网站平台
  • 悉知网站建设鸿星尔克网络营销
  • 怎样做网站建设的程序手机端网站优化
  • 阿里云免费企业邮箱申请德州网站建设优化
  • 建设国家地质公园网站主要功能中牟网络推广外包
  • 月嫂网站建设方案互联网广告销售是做什么的
  • 奶茶店做网站好处抖音十大搜索关键词
  • 网站接电话win7系统优化
  • 合肥建设网站查询网销怎么做才能做好
  • 凡科建设网站怎么保存站长工具5g
  • 网站弹窗代码网店营销策划方案
  • 网站为什么做301晚上国网app
  • 绵阳网站建设怎么做适合企业员工培训的课程
  • sogo提交网站入口百度电商平台
  • 宜昌网站制作嘉兴seo外包平台