注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿弥陀佛

街树飘影未见尘 潭月潜水了无声 般若观照心空静...

 
 
 

日志

 
 
关于我

一直从事气象预报、服务建模实践应用。 注重气象物理场、实况场、地理信息、本体知识库、分布式气象内容管理系统建立。 对Barnes客观分析, 小波,计算神经网络、信任传播、贝叶斯推理、专家系统、网络本体语言有一定体会。 一直使用Java、Delphi、Prolog、SQL编程。

网易考拉推荐

getMaxGrad4Val 根据梯度最大过滤极值  

2016-01-08 17:13:58|  分类: Scala |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

def getMaxGrad4Val(sorted : Array[Float])={
val upGrade = 20.0f
val len = sorted.length
import common.Utils._

val dv : Array[Float] = Array.fill[Float](len)(0.0f)
for (i <- 0 until len - 1)
dv(i) = math.abs(sorted(i+1) - sorted(i))
val maxGrade = arr_idx(dv).last._1
val maxGradeIdx = arr_idx(dv).last._2
if (maxGrade < upGrade) sorted(len - 1) else sorted(maxGradeIdx + 1)
}
(500.0,1046.6),(905.6994,1064.4218),(-61.5,53.8),(-61.5,25.7),(0.0,100.0),(0.0,33.0),(0.0,97.5),(0.0,360.0),(0.0,16.8),(-44.2,59.7),(-2.8,30.3),(-1.5,32.1),(-1.3,32.7),(-1.1,32.8),(-60.0,32.2),(-12.29589,14.612507),(-15.576688,13.778199),(-57.664665,84.316124)

bound=2
(500.3,1036.1),(952.9996,1058.0),(-60.0,50.1),(-60.0,25.7),(0.0,100.0),(0.0,33.0),(0.0,22.7),(0.0,360.0),(0.0,16.4),(-11.5,29.3),(-2.0,29.9),(-1.3,32.0),(-1.2,32.4),(-0.9,32.1),(-0.8,31.3),(-11.126206,12.651672),(-14.251309,11.594443),(-47.437737,84.23514)

bound=3
(500.4,1034.3),(967.8,1052.3),(-39.9,35.8),(-39.9,25.5),(0.0,100.0),(0.0,32.6),(0.0,11.0),(0.0,360.0),(0.0,15.6),(-9.8,26.2),(-1.8,28.6),(-1.3,29.9),(-1.2,30.5),(-0.9,30.7),(-0.5,30.9),(-10.858521,10.770283),(-12.605336,11.357815),(-41.242687,83.79919)

bound = 4
(501.2,1026.9),(971.5,1046.9),(-32.7,29.5),(-32.7,25.4),(0.0,100.0),(0.0,32.4),(0.0,9.7),(0.0,360.0),(0.0,14.2),(-9.7,26.2),(-1.8,28.3),(-1.3,29.9),(-1.1,30.4),(-0.9,30.3),(0.0,29.2),(-10.778912,9.345742),(-12.422474,8.219225),(-9.165417,83.29685)


bound = 5
(544.3,1026.6),(971.5,1046.3),(-28.0,29.5),(-28.0,24.9),(0.0,100.0),(0.0,31.2),(0.0,9.6),(0.0,360.0),(0.0,13.8),(-9.6,26.1),(-1.7,28.2),(-1.2,29.1),(-0.9,30.0),(-0.6,30.3),(0.0,29.0),(-10.573878,9.294334),(-12.253195,7.9716516),(-8.061696,80.099304)

bound = 6
(552.9,1026.6),(973.4,1045.4),(-18.7,29.4),(-18.7,24.9),(0.0,100.0),(0.0,31.1),(0.0,9.3),(0.0,360.0),(0.0,13.7),(-9.3,25.5),(-1.7,27.8),(-1.1,28.9),(-0.9,29.4),(-0.6,29.7),(0.1,28.9),(-9.71197,9.257193),(-11.811298,7.940369),(-5.906543,78.75299)

bound = 7
(553.6,1026.6),(978.2,1045.3),(-13.5,29.3),(-13.5,24.9),(0.0,100.0),(0.0,31.0),(0.0,8.7),(0.0,360.0),(0.0,12.9),(-9.1,25.4),(-1.7,27.2),(-1.1,28.7),(-0.8,28.9),(-0.6,29.3),(0.1,28.6),(-8.65009,9.0210495),(-11.690412,7.799449),(-3.391802,77.9987)
============================================================================================
前10个最大梯度值
(43.099976,10.5),(47.30017,6.421753),(20.099998,14.299999),(20.099998,0.5),(0.0,0.0),(0.0,1.2000008),(0.0,74.8),(0.0,0.0),(0.0,1.4000006),(32.7,30.400002),(0.79999995,1.2999992),(0.20000005,2.1000004),(0.20000005,1.9000015),(0.29999995,1.3999977),(59.2,1.6999989),(1.1696835,1.9608345),(1.6459732,3.1385899),(32.07727,3.197548)

(501.2,1026.5),(905.6994,1040.8),(-60.0,28.5),(-60.0,24.8),(0.0,100.0),(0.0,30.5),(0.0,97.5),(0.0,360.0),(0.0,12.7),(-44.2,59.7),(-1.4,26.3),(-0.9,27.7),(-0.6,28.5),(-0.5,28.7),(-60.0,28.2),(-8.017184,8.869014),(-10.493604,7.362204),(-41.242687,77.19211)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
(544.3,1026.5),(952.9996,1040.8),(-39.9,28.5),(-39.9,24.8),(0.0,100.0),(0.0,30.5),(0.0,22.7),(0.0,360.0),(0.0,12.7),(-11.5,29.3),(-1.4,26.3),(-0.9,27.7),(-0.6,28.5),(-0.5,28.7),(-0.8,28.2),(-8.017184,8.869014),(-10.493604,7.362204),(-9.165417,77.19211)
============================================================================================
  评论这张
 
阅读(185)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017