?? 一些常用的軟件濾波方法_jj.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0038)http://www.zmmcu.com/showart.asp?id=72 -->
<HTML><HEAD><TITLE>青青子木電子世界--> 一些常用的軟件濾波方法</TITLE>
<SCRIPT>
function copyit(obj){
obj.select();
js=obj.createTextRange();
js.execCommand("Copy");
}
function saveAs(obj){
var winname=window.open('','test','top=10000');
winname.document.open("text/html", "replace");
winname.document.write(obj.value);
winname.document.execCommand('saveas','','code.html');
winname.close();
}
function runit(obj)
{
var winname=window.open("","test","");
winname.document.open("text/html", "replace");
winname.document.write(obj.value);
winname.document.close();
}
</SCRIPT>
<LINK href="一些常用的軟件濾波方法_jj.files/blue.css" type=text/css rel=stylesheet>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=javaScript src="一些常用的軟件濾波方法_jj.files/js.js"
type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src=""></SCRIPT>
<STYLE type=text/css>.style1 {
FONT-WEIGHT: bold; COLOR: #333333
}
</STYLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY><!-- 頭部表格開始 zmmcu.com -->
<TABLE class=headtab cellSpacing=0 cellPadding=0 width=780 border=0>
<TBODY>
<TR>
<TD vAlign=center align=middle width=172><IMG height=52
src="一些常用的軟件濾波方法_jj.files/logo.gif" width=172></TD>
<TD vAlign=center align=middle width=462><IMG height=60
src="一些常用的軟件濾波方法_jj.files/468X60.gif" width=468></TD>
<TD vAlign=center align=middle width=126 height=70><A
onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.zmmcu.com');"
href="http://www.zmmcu.com/showart.asp?id=72#">設為首頁</A><BR><A
href="javascript:window.external.addFavorite('http://www.zmmcu.com','青青子木');">加入收藏</A><BR><A
href="http://www.zmmcu.com/showart.asp?id=72#">聯系我們</A></TD></TR>
<TR>
<TD class=navtd colSpan=3>
<SCRIPT language=JavaScript>
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var I=0;I<this.length;I++)
this[I+1]=initArray.arguments[I] }
var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
document.write("<font color=##000000 style='font-size:9pt;font-family: 宋體'> ",today.getYear(),"年",
today.getMonth()+1,"月", today.getDate(),"日",d[today.getDay()+1], "</font>" ); </SCRIPT>
<IMG height=11 src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2><A
class=a1
href="http://www.zmmcu.com/index.asp"> <STRONG>首頁</STRONG> </A><IMG
height=11 src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2> <A class=a1
href="http://www.zmmcu.com/downList.asp"><STRONG>下載中心</STRONG></A> <IMG
height=11 src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2> <A class=a1
href="http://www.zmmcu.com/artlist.asp"><STRONG>文章中心</STRONG></A> <IMG
height=11 src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2> <A class=a1
href="http://www.zmmcu.com/product.asp"><FONT
color=#ffff00><STRONG>產品中心</STRONG></FONT></A> <IMG height=11
src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2> <A class=a1
href="http://www.zmmcu.com/consumer.asp"><FONT style="FONT-WEIGHT: bold"
color=#ffff00>商務中心 </FONT></A><IMG height=11
src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2> <A class=a1
href="http://www.zmmcu.com/bbs"><STRONG>子木論壇</STRONG></A> <IMG height=11
src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2> <A class=a1
href="http://www.zmmcu.com/payshow.asp"></A><A class=a1
href="http://www.zmmcu.com/contact.asp"><STRONG>購買指南</STRONG></A> <IMG
height=11 src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2><A class=a1
href="http://www.zmmcu.com/payshow.asp"><STRONG> 付款說明</STRONG></A></A><A
class=a1 href="http://www.zmmcu.com/contact.asp"></A> <IMG height=11
src="一些常用的軟件濾波方法_jj.files/nav_line.gif" width=2></TD></TR></TBODY></TABLE><BR><!-- 頭部表格結束 zmmcu.com -->
<TABLE cellSpacing=0 cellPadding=0 width=760 border=0>
<TBODY>
<TR>
<TD vAlign=center align=left> </TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=760 border=0>
<TBODY>
<TR>
<TD width="3%" background=一些常用的軟件濾波方法_jj.files/3.gif height=25
rowSpan=2> </TD>
<TD bgColor=#2b90f5 height=4></TD></TR>
<TR>
<TD align=left width="97%" bgColor=#eeeeee height=22> <SPAN
class=style1>閱讀文章</SPAN></TD></TR>
<TR vAlign=center align=middle>
<TD colSpan=2 height=30><FONT color=#000000
size=3><STRONG>一些常用的軟件濾波方法</STRONG></FONT></TD></TR>
<TR align=middle>
<TD style="FONT-SIZE: 12px; FONT-FAMILY: '宋體'" colSpan=2>[ 日期: 2005-6-16 ]
作者:不詳 字體 [ <A
href="javascript:ContentSize(16)">大</A> <A
href="javascript:ContentSize(14)">中</A> <A
href="javascript:ContentSize(12)">小</A> ] </TD></TR>
<TR>
<TD colSpan=2>
<DIV
id=size><BR> 1、限副濾波<BR>/* A值可根據實際情況調整<BR> value為有效值,new_value為當前采樣值 <BR> 濾波程序返回有效的實際值 */<BR>#define A 10
<P></P>
<P></P>
<P>char value;</P>
<P><BR>char filter()<BR>{<BR> char new_value;<BR> new_value = get_ad();<BR> if ( ( new_value - value > A ) || ( value - new_value > A )<BR> return value;<BR> return new_value;<BR> <BR>}</P>
<P><BR>2、中位值濾波法<BR>/* N值可根據實際情況調整<BR> 排序采用冒泡法*/<BR>#define N 11</P>
<P><BR>char filter()<BR>{<BR> char value_buf[N];<BR> char count,i,j,temp;<BR> for ( count=0;countvalue_buf[i+1] )<BR> {<BR> temp = value_buf;<BR> value_buf = value_buf[i+1]; <BR> value_buf[i+1] = temp;<BR> }<BR> }<BR> }<BR> return value_buf[(N-1)/2];<BR>} </P>
<P><BR>3、算術平均濾波法<BR>/*<BR>*/</P>
<P><BR>#define N 12</P>
<P><BR>char filter()<BR>{<BR> int sum = 0;<BR> for ( count=0;countvalue_buf[i+1] )<BR> {<BR> temp = value_buf;<BR> value_buf = value_buf[i+1]; <BR> value_buf[i+1] = temp;<BR> }<BR> }<BR> }<BR> for(count=1;count=N) return new_value;<BR> delay();<BR> new_value = get_ad();<BR> }<BR> return value; <BR>}</P></DIV></TD></TR>
<TR align=right>
<TD style="FONT-SIZE: 12px; FONT-FAMILY: '宋體'" colSpan=2>閱讀:<FONT
color=red>1038</FONT> 次 </TD></TR>
<TR align=right>
<TD colSpan=2>【 <A href="javascript:window.print()">打印</A>
】</TD></TR></TBODY></TABLE><!-- 底部表格開始 zmmcu.com -->
<TABLE cellSpacing=0 cellPadding=0 width=760 border=0>
<TBODY>
<TR bgColor=#2287ed>
<TD colSpan=3 height=3></TD></TR>
<TR>
<TD align=right><IMG height=34 src="一些常用的軟件濾波方法_jj.files/bottom_01.gif"
width=8></TD>
<TD vAlign=center align=middle width=500
background=一些常用的軟件濾波方法_jj.files/bottom_02.gif><A
title="請先加好本站連接.然后聯系QQ: 303196938"
href="http://www.zmmcu.com/showart.asp?id=72#">友情鏈接</A> | <A
title="聯系QQ: 303196938 郵件: avrsp001@vip.163.com"
href="http://www.zmmcu.com/contact.asp">業務聯系</A> | <A
title="本站建站于2004 站長: 青青子木"
href="http://www.zmmcu.com/showart.asp?id=72#">關于本站</A> | <A title=閑人免進
href="http://www.zmmcu.com/showart.asp?id=72#">后臺管理</A><BR></TD>
<TD align=left><IMG height=34 src="一些常用的軟件濾波方法_jj.files/bottom_03.gif"
width=9></TD></TR>
<TR>
<TD class=font1 align=middle colSpan=3><BR>Copyright© 2004-2008 <A
href="http://www.zmmcu.com/">青青子木電子世界</A> All Rights Reserved<BR><A
href="http://www.miibeian.gov.cn/" target=_blank><FONT
color=#ff0000>粵ICP備05008583</FONT></A><BR>Version 2.0 耗時 .03
毫秒<BR>請使用IE5.5 以上瀏覽器訪問本站 <BR>
<SCRIPT language=JavaScript src="一些常用的軟件濾波方法_jj.files/click.htm"
type=text/javascript></SCRIPT>
<SCRIPT src="一些常用的軟件濾波方法_jj.files/click.aspx"></SCRIPT>
</TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript src="一些常用的軟件濾波方法_jj.files/floatads.js"></SCRIPT>
<DIV id=yuxingtome style="POSITION: absolute"><A title=子木網首頁
href="http://localhost/" target=_blank><IMG onmouseover=yuxingstop();
onmouseout=yuxingstop(0); height=0 src="一些常用的軟件濾波方法_jj.files/d_download.gif"
width=0 border=0></A></DIV>
<SCRIPT language=JavaScript>yuxingtome()</SCRIPT>
<!-- 底部表格結束 zmmcu.com --></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -