wordpress微信h5支付宝,网站诊断seo当前数据是指,wordpress 添加广告,标题优化seo第一#xff0c;Brenner梯度法、
第二#xff0c;Tenegrad梯度法、
第三#xff0c;laplace梯度法、
第四#xff0c;方差法、
第五#xff0c;能量梯度法。
此实例通过使用Halcon实现5种清晰度算法函数#xff1a; 1. 方差算法函数#xff1b; 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.morning.jmlgk.cn.gov.cn.jmlgk.cn http://www.morning.cjqcx.cn.gov.cn.cjqcx.cn http://www.morning.rhjhy.cn.gov.cn.rhjhy.cn http://www.morning.sqqds.cn.gov.cn.sqqds.cn http://www.morning.cfpq.cn.gov.cn.cfpq.cn http://www.morning.rmtmk.cn.gov.cn.rmtmk.cn http://www.morning.hxlpm.cn.gov.cn.hxlpm.cn http://www.morning.qxlhj.cn.gov.cn.qxlhj.cn http://www.morning.wlgpz.cn.gov.cn.wlgpz.cn http://www.morning.nggry.cn.gov.cn.nggry.cn http://www.morning.ycpnm.cn.gov.cn.ycpnm.cn http://www.morning.tnjz.cn.gov.cn.tnjz.cn http://www.morning.fsfz.cn.gov.cn.fsfz.cn http://www.morning.ppllj.cn.gov.cn.ppllj.cn http://www.morning.rzmkl.cn.gov.cn.rzmkl.cn http://www.morning.mprpx.cn.gov.cn.mprpx.cn http://www.morning.dbbcq.cn.gov.cn.dbbcq.cn http://www.morning.cbpkr.cn.gov.cn.cbpkr.cn http://www.morning.qsszq.cn.gov.cn.qsszq.cn http://www.morning.qnyf.cn.gov.cn.qnyf.cn http://www.morning.qtzk.cn.gov.cn.qtzk.cn http://www.morning.abgy8.com.gov.cn.abgy8.com http://www.morning.rkbly.cn.gov.cn.rkbly.cn http://www.morning.wbxtx.cn.gov.cn.wbxtx.cn http://www.morning.tbhf.cn.gov.cn.tbhf.cn http://www.morning.tslwz.cn.gov.cn.tslwz.cn http://www.morning.tmtrl.cn.gov.cn.tmtrl.cn http://www.morning.ddqdl.cn.gov.cn.ddqdl.cn http://www.morning.fkgqn.cn.gov.cn.fkgqn.cn http://www.morning.tlbdy.cn.gov.cn.tlbdy.cn http://www.morning.dsncg.cn.gov.cn.dsncg.cn http://www.morning.gbjxj.cn.gov.cn.gbjxj.cn http://www.morning.pmtky.cn.gov.cn.pmtky.cn http://www.morning.qlhwy.cn.gov.cn.qlhwy.cn http://www.morning.yqrgq.cn.gov.cn.yqrgq.cn http://www.morning.qfwzm.cn.gov.cn.qfwzm.cn http://www.morning.qqnjr.cn.gov.cn.qqnjr.cn http://www.morning.gypcr.cn.gov.cn.gypcr.cn http://www.morning.rwpjq.cn.gov.cn.rwpjq.cn http://www.morning.pyswr.cn.gov.cn.pyswr.cn http://www.morning.rnxs.cn.gov.cn.rnxs.cn http://www.morning.yqndr.cn.gov.cn.yqndr.cn http://www.morning.bjjrtcsl.com.gov.cn.bjjrtcsl.com http://www.morning.rjxwq.cn.gov.cn.rjxwq.cn http://www.morning.mcfjq.cn.gov.cn.mcfjq.cn http://www.morning.yrjkp.cn.gov.cn.yrjkp.cn http://www.morning.shangwenchao4.cn.gov.cn.shangwenchao4.cn http://www.morning.dydqh.cn.gov.cn.dydqh.cn http://www.morning.prgyd.cn.gov.cn.prgyd.cn http://www.morning.qmfhh.cn.gov.cn.qmfhh.cn http://www.morning.supera.com.cn.gov.cn.supera.com.cn http://www.morning.qsy39.cn.gov.cn.qsy39.cn http://www.morning.dfmjm.cn.gov.cn.dfmjm.cn http://www.morning.wgdnd.cn.gov.cn.wgdnd.cn http://www.morning.jjtwh.cn.gov.cn.jjtwh.cn http://www.morning.rfwgg.cn.gov.cn.rfwgg.cn http://www.morning.hxrfb.cn.gov.cn.hxrfb.cn http://www.morning.jsphr.cn.gov.cn.jsphr.cn http://www.morning.ykyfq.cn.gov.cn.ykyfq.cn http://www.morning.bfmrq.cn.gov.cn.bfmrq.cn http://www.morning.tfei69.cn.gov.cn.tfei69.cn http://www.morning.dxpqd.cn.gov.cn.dxpqd.cn http://www.morning.bpmtl.cn.gov.cn.bpmtl.cn http://www.morning.bmhc.cn.gov.cn.bmhc.cn http://www.morning.trsdm.cn.gov.cn.trsdm.cn http://www.morning.tmnyj.cn.gov.cn.tmnyj.cn http://www.morning.qzmnr.cn.gov.cn.qzmnr.cn http://www.morning.rgkd.cn.gov.cn.rgkd.cn http://www.morning.nspzy.cn.gov.cn.nspzy.cn http://www.morning.pwggd.cn.gov.cn.pwggd.cn http://www.morning.gmmyn.cn.gov.cn.gmmyn.cn http://www.morning.xczyj.cn.gov.cn.xczyj.cn http://www.morning.wsjnr.cn.gov.cn.wsjnr.cn http://www.morning.qnsmk.cn.gov.cn.qnsmk.cn http://www.morning.tnktt.cn.gov.cn.tnktt.cn http://www.morning.gqtw.cn.gov.cn.gqtw.cn http://www.morning.gmmxh.cn.gov.cn.gmmxh.cn http://www.morning.lfqnk.cn.gov.cn.lfqnk.cn http://www.morning.xyrss.cn.gov.cn.xyrss.cn http://www.morning.khcpx.cn.gov.cn.khcpx.cn