??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美—级a级欧美特级ar全黄,国产精品sss,欧美一级久久久久久久大片http://www.shnenglu.com/polly-yang/zh-cnSun, 24 Aug 2025 04:59:32 GMTSun, 24 Aug 2025 04:59:32 GMT60DSP包含的图像算法库http://www.shnenglu.com/polly-yang/archive/2012/09/18/191141.htmlpollypollyTue, 18 Sep 2012 11:19:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/09/18/191141.htmlhttp://www.shnenglu.com/polly-yang/comments/191141.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/09/18/191141.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/191141.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/191141.html阅读全文

polly 2012-09-18 19:19 发表评论
]]>
【{载】在Ubuntu下安装PythonU学计算环境http://www.shnenglu.com/polly-yang/archive/2012/09/18/191093.htmlpollypollyTue, 18 Sep 2012 05:02:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/09/18/191093.htmlhttp://www.shnenglu.com/polly-yang/comments/191093.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/09/18/191093.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/191093.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/191093.html原文地址Q?a target="_blank">在Ubuntu中安装PythonU学计算环境 作?/strong>Q?a target="_blank">HyryStudio


在Ubuntu下安装Python模块通常可以使用apt-get和pip命o。apt-get命o是Ubuntu自带的包理命oQ而pip则是Python安装扩展模块的工P通常pip会下载扩展模块的源代码ƈ~译安装?/p>

Ubuntu 12.04中缺省安装了Python2.7.3Q首先通过下面的命令安装pipQpip是Python的一个安装和理扩展库的工具?/p>

sudo apt-get install python-pip

安装Python开发环境,方便今后~译其他扩展库,占用I间92.8MQ?/p>

sudo apt-get install python-dev

IPython

Z安装最新版的IPython 0.13betaQ需要下载IPython源代码,q执行安装命令。在IPython 0.13beta中提供了改进版本的IPython notebook。下面的命o首先安装版本理软ggitQ然后通过git命o从IPython的开发代码库中下载最新版本的IPython源代码,q执行安装命令:

cd
sudo apt-get install git
git clone https://github.com/ipython/ipython.git
cd ipython
sudo python setup.py install

如果安装目前的最新稳定版本,可以输入:

sudo apt-get install ipython

安装完毕之后Q请输入ipython命o试是否能正常启动?/p>

Z让IPython notebook工作Q还q需要安装tornado和pyzmqQ?/p>

sudo pip install tornado
sudo apt-get install libzmq-dev
sudo pip install pyzmq
sudo pip install pygments

下面试IPythonQ?/p>

cd
mkdir notebook
cd notebook
ipython notebook

Z在IPython中离U用LaTeX数学公式Q需要安装mathjaxQ首先输入下面的命o启动ipython notebookQ?/p>

sudo ipython notebook

在IPython notebook界面中输入:

from IPython.external.mathjax import install_mathjax
install_mathjax()

NumPyQSciPy和matplotlib

通过apt-get命o可以快速安装这三个库:

sudo apt-get install python-numpy
sudo apt-get install python-scipy
sudo apt-get install python-matplotlib

如果需要通过pip~译安装Q可以先用apt-get命o安装所有编译所需的库Q?/p>

sudo apt-get build-dep python-numpy
sudo apt-get build-dep python-scipy

然后通过pip命o安装Q?/p>

sudo pip install numpy
sudo pip install scipy
通过build-dep会安装很多库Q包括Python 3.2?/div>

PyQt4和Spyder

下面的命令安装PyQt4QQt界面设计器,PyQt4的开发工具以及文档:

sudo apt-get install python-qt4
sudo apt-get install qt4-designer
sudo apt-get install pyqt4-dev-tools
sudo apt-get install python-qt4-doc

安装完毕之后Q文位于:

/usr/share/doc/python-qt4-doc

安装好PyQt4之后通过下面的命令安装SpyderQ?/p>

sudo apt-get install spyder

׃Spyderl常更新Q通过下面的命令可以安装最新版Q?/p>

sudo pip install spyder --upgrade

cython和SWIG

Cython和SWIG是编写Python扩展模块的工P

sudo pip install cython
sudo apt-get install swig

输入 cython --version ?swig -version 查看版本?/p>

ETS

ETS是enthought公司开发的一套科学计Y件包Q其中的Mayavi通过VTK实现数据的三l可视化?/p>

首先通过下面的命令安装编译ETS所需的库Q?/p>

sudo apt-get install python-dev libxtst-dev scons python-vtk  pyqt4-dev-tools python2.7-wxgtk2.8 python-configobj
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

创徏ets目录Qƈ在此目录下下载ets.pyQ运行ets.py可以复制最新版的ETS源程序,q安装:

mkdir ets
cd ets
wget https://github.com/enthought/ets/raw/master/ets.py
python ets.py clone
sudo python ets.py develop
#sudo python ets.py install 或者运行install安装

如果一切正常,那么输入 mayavi2 命o则会启动mayavi?/p>

OpenCV

Z~译OpenCV需要下载cmake~译工具Q和一些依赖库Q?/p>

sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install cmake-gui
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libjasper-dev

然后?http://sourceforge.net/projects/opencvlibrary/ 下蝲最新版的OpenCV源代码,q解压。然后创建编译用的目录releaseQƈ启动cmake-gui:

mkdir release
cmake-gui

在界面中选择OpenCV源代码的目录Q和~译输出目录releaseQ然后按Configure按钮QƈҎ需要设|各个编译选项Q最后点Generate按钮Q退出cmake-gui界面。进入编译\径,执行下面的命令:

cd release
make
sudo make install

安装完毕之后Q启动IPythonQƈ输入 import cv2 试OpenCV是否能正常蝲入?/p>

 



polly 2012-09-18 13:02 发表评论
]]>Python登陆Zh|ƈ抓取新鲜?/title><link>http://www.shnenglu.com/polly-yang/archive/2012/09/17/190975.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Mon, 17 Sep 2012 06:20:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2012/09/17/190975.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/190975.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2012/09/17/190975.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/190975.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/190975.html</trackback:ping><description><![CDATA[<p> </p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img id="Code_Closed_Image_141844" onclick="this.style.display='none'; Code_Closed_Text_141844.style.display='none'; Code_Open_Image_141844.style.display='inline'; Code_Open_Text_141844.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" width="11" height="16"><img style="display: none" id="Code_Open_Image_141844" onclick="this.style.display='none'; Code_Open_Text_141844.style.display='none'; Code_Closed_Image_141844.style.display='inline'; Code_Closed_Text_141844.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" height="16"><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Code_Closed_Text_141844"></span><span style="display: none" id="Code_Open_Text_141844"><br /><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080"> 1</span><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #0000ff">from</span><span style="color: #000000"> sgmllib </span><span style="color: #0000ff">import</span><span style="color: #000000"> SGMLParser<br /></span><span style="color: #008080"> 2</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> sys,urllib2,urllib,cookielib<br /></span><span style="color: #008080"> 3</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> spider(SGMLParser):<br /></span><span style="color: #008080"> 4</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> </span><span style="color: #800080">__init__</span><span style="color: #000000">(self,email,password):<br /></span><span style="color: #008080"> 5</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        SGMLParser.</span><span style="color: #800080">__init__</span><span style="color: #000000">(self)<br /></span><span style="color: #008080"> 6</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.h3</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080"> 7</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.h3_is_ready</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080"> 8</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.div</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080"> 9</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.h3_and_div</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">10</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.a</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">11</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.depth</span><span style="color: #000000">=</span><span style="color: #000000">0<br /></span><span style="color: #008080">12</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.names</span><span style="color: #000000">=</span><span style="color: #800000">""</span><span style="color: #000000"><br /></span><span style="color: #008080">13</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.dic</span><span style="color: #000000">=</span><span style="color: #000000">{}   <br /></span><span style="color: #008080">14</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />         <br /></span><span style="color: #008080">15</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.email</span><span style="color: #000000">=</span><span style="color: #000000">email<br /></span><span style="color: #008080">16</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.password</span><span style="color: #000000">=</span><span style="color: #000000">password<br /></span><span style="color: #008080">17</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.domain</span><span style="color: #000000">=</span><span style="color: #800000">'</span><span style="color: #800000">renren.com</span><span style="color: #800000">'</span><span style="color: #000000"><br /></span><span style="color: #008080">18</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">try</span><span style="color: #000000">:<br /></span><span style="color: #008080">19</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            cookie</span><span style="color: #000000">=</span><span style="color: #000000">cookielib.CookieJar()<br /></span><span style="color: #008080">20</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            cookieProc</span><span style="color: #000000">=</span><span style="color: #000000">urllib2.HTTPCookieProcessor(cookie)<br /></span><span style="color: #008080">21</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">except</span><span style="color: #000000">:<br /></span><span style="color: #008080">22</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">raise</span><span style="color: #000000"><br /></span><span style="color: #008080">23</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">else</span><span style="color: #000000">:<br /></span><span style="color: #008080">24</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            opener</span><span style="color: #000000">=</span><span style="color: #000000">urllib2.build_opener(cookieProc)<br /></span><span style="color: #008080">25</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            urllib2.install_opener(opener)       <br /></span><span style="color: #008080">26</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><br /></span><span style="color: #008080">27</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> login(self):<br /></span><span style="color: #008080">28</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        url</span><span style="color: #000000">=</span><span style="color: #800000">'</span><span style="color: #800000">http://www.renren.com/PLogin.do</span><span style="color: #800000">'</span><span style="color: #000000"><br /></span><span style="color: #008080">29</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        postdata</span><span style="color: #000000">=</span><span style="color: #000000">{<br /></span><span style="color: #008080">30</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                  </span><span style="color: #800000">'</span><span style="color: #800000">email</span><span style="color: #800000">'</span><span style="color: #000000">:self.email,<br /></span><span style="color: #008080">31</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                  </span><span style="color: #800000">'</span><span style="color: #800000">password</span><span style="color: #800000">'</span><span style="color: #000000">:self.password,<br /></span><span style="color: #008080">32</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                  </span><span style="color: #800000">'</span><span style="color: #800000">domain</span><span style="color: #800000">'</span><span style="color: #000000">:self.domain  <br /></span><span style="color: #008080">33</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                  }<br /></span><span style="color: #008080">34</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        req</span><span style="color: #000000">=</span><span style="color: #000000">urllib2.Request(<br /></span><span style="color: #008080">35</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                            url,<br /></span><span style="color: #008080">36</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                            urllib.urlencode(postdata)            <br /></span><span style="color: #008080">37</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                            )<br /></span><span style="color: #008080">38</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        <br /></span><span style="color: #008080">39</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.file</span><span style="color: #000000">=</span><span style="color: #000000">urllib2.urlopen(req).read()<br /></span><span style="color: #008080">40</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #008000">#</span><span style="color: #008000">print self.file</span><span style="color: #008000"><br /></span><span style="color: #008080">41</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">def</span><span style="color: #000000"> start_h3(self,attrs):<br /></span><span style="color: #008080">42</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.h3 </span><span style="color: #000000">=</span><span style="color: #000000"> True<br /></span><span style="color: #008080">43</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> end_h3(self):<br /></span><span style="color: #008080">44</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.h3</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">45</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.h3_is_ready</span><span style="color: #000000">=</span><span style="color: #000000">True<br /></span><span style="color: #008080">46</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        <br /></span><span style="color: #008080">47</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> start_a(self,attrs):<br /></span><span style="color: #008080">48</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.h3 </span><span style="color: #0000ff">or</span><span style="color: #000000"> self.div:<br /></span><span style="color: #008080">49</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.a</span><span style="color: #000000">=</span><span style="color: #000000">True<br /></span><span style="color: #008080">50</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> end_a(self):<br /></span><span style="color: #008080">51</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        self.a</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">52</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        <br /></span><span style="color: #008080">53</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> start_div(self,attrs):<br /></span><span style="color: #008080">54</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.h3_is_ready </span><span style="color: #000000">==</span><span style="color: #000000"> False:<br /></span><span style="color: #008080">55</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">return</span><span style="color: #000000"><br /></span><span style="color: #008080">56</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.div</span><span style="color: #000000">==</span><span style="color: #000000">True:<br /></span><span style="color: #008080">57</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.depth </span><span style="color: #000000">+=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000"><br /></span><span style="color: #008080">58</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            <br /></span><span style="color: #008080">59</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">for</span><span style="color: #000000"> k,v </span><span style="color: #0000ff">in</span><span style="color: #000000"> attrs:<br /></span><span style="color: #008080">60</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">if</span><span style="color: #000000"> k </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">'</span><span style="color: #800000">class</span><span style="color: #800000">'</span><span style="color: #000000"> </span><span style="color: #0000ff">and</span><span style="color: #000000"> v </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800000">'</span><span style="color: #800000">content</span><span style="color: #800000">'</span><span style="color: #000000">:<br /></span><span style="color: #008080">61</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                self.div</span><span style="color: #000000">=</span><span style="color: #000000">True;<br /></span><span style="color: #008080">62</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                self.h3_and_div</span><span style="color: #000000">=</span><span style="color: #000000">True   </span><span style="color: #008000">#</span><span style="color: #008000">h3 and div is connected</span><span style="color: #008000"><br /></span><span style="color: #008080">63</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">def</span><span style="color: #000000"> end_div(self):<br /></span><span style="color: #008080">64</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.depth </span><span style="color: #000000">==</span><span style="color: #000000"> 0:<br /></span><span style="color: #008080">65</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.div</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">66</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.h3_and_div</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">67</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.h3_is_ready</span><span style="color: #000000">=</span><span style="color: #000000">False<br /></span><span style="color: #008080">68</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.names</span><span style="color: #000000">=</span><span style="color: #800000">""</span><span style="color: #000000"><br /></span><span style="color: #008080">69</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.div </span><span style="color: #000000">==</span><span style="color: #000000"> True:<br /></span><span style="color: #008080">70</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.depth</span><span style="color: #000000">-=</span><span style="color: #000000">1</span><span style="color: #000000"><br /></span><span style="color: #008080">71</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> handle_data(self,text):<br /></span><span style="color: #008080">72</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #008000">#</span><span style="color: #008000">record the name</span><span style="color: #008000"><br /></span><span style="color: #008080">73</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.h3 </span><span style="color: #0000ff">and</span><span style="color: #000000"> self.a:<br /></span><span style="color: #008080">74</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.names</span><span style="color: #000000">+=</span><span style="color: #000000">text<br /></span><span style="color: #008080">75</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #008000">#</span><span style="color: #008000">record says</span><span style="color: #008000"><br /></span><span style="color: #008080">76</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.h3 </span><span style="color: #0000ff">and</span><span style="color: #000000"> (self.a</span><span style="color: #000000">==</span><span style="color: #000000">False):<br /></span><span style="color: #008080">77</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">if</span><span style="color: #000000"> </span><span style="color: #0000ff">not</span><span style="color: #000000"> text:</span><span style="color: #0000ff">pass</span><span style="color: #000000"><br /></span><span style="color: #008080">78</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">else</span><span style="color: #000000">: self.dic.setdefault(self.names,[]).append(text)<br /></span><span style="color: #008080">79</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">return</span><span style="color: #000000"> <br /></span><span style="color: #008080">80</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> self.h3_and_div:<br /></span><span style="color: #008080">81</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            self.dic.setdefault(self.names,[]).append(text)<br /></span><span style="color: #008080">82</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            <br /></span><span style="color: #008080">83</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: #0000ff">def</span><span style="color: #000000"> show(self):<br /></span><span style="color: #008080">84</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        type </span><span style="color: #000000">=</span><span style="color: #000000"> sys.getfilesystemencoding()<br /></span><span style="color: #008080">85</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #0000ff">for</span><span style="color: #000000"> key </span><span style="color: #0000ff">in</span><span style="color: #000000"> self.dic:<br /></span><span style="color: #008080">86</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #0000ff">print</span><span style="color: #000000"> ( (</span><span style="color: #800000">''</span><span style="color: #000000">.join(key)).replace(</span><span style="color: #800000">'</span><span style="color: #800000"> </span><span style="color: #800000">'</span><span style="color: #000000">,</span><span style="color: #800000">''</span><span style="color: #000000">)).decode(</span><span style="color: #800000">'</span><span style="color: #800000">utf-8</span><span style="color: #800000">'</span><span style="color: #000000">).encode(type), \<br /></span><span style="color: #008080">87</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />                  ( (</span><span style="color: #800000">''</span><span style="color: #000000">.join(self.dic[key])).replace(</span><span style="color: #800000">'</span><span style="color: #800000"> </span><span style="color: #800000">'</span><span style="color: #000000">,</span><span style="color: #800000">''</span><span style="color: #000000">)).decode(</span><span style="color: #800000">'</span><span style="color: #800000">utf-8</span><span style="color: #800000">'</span><span style="color: #000000">).encode(type)<br /></span><span style="color: #008080">88</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><br /></span><span style="color: #008080">89</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /> <br /></span><span style="color: #008080">90</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><br /></span><span style="color: #008080">91</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><br /></span><span style="color: #008080">92</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />renrenspider</span><span style="color: #000000">=</span><span style="color: #000000">spider(</span><span style="color: #800000">'</span><span style="color: #800000">your email</span><span style="color: #800000">'</span><span style="color: #000000">,</span><span style="color: #800000">'</span><span style="color: #800000">your password</span><span style="color: #800000">'</span><span style="color: #000000">)<br /></span><span style="color: #008080">93</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />renrenspider.login()<br /></span><span style="color: #008080">94</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />renrenspider.feed(renrenspider.file)<br /></span><span style="color: #008080">95</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />renrenspider.show()<br /></span><span style="color: #008080">96</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span></span></div> <p> </p> <img src ="http://www.shnenglu.com/polly-yang/aggbug/190975.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2012-09-17 14:20 <a href="http://www.shnenglu.com/polly-yang/archive/2012/09/17/190975.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>国航空母舰?Google Earth上的坐标http://www.shnenglu.com/polly-yang/archive/2012/08/19/187652.htmlpollypollySun, 19 Aug 2012 02:34:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/08/19/187652.htmlhttp://www.shnenglu.com/polly-yang/comments/187652.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/08/19/187652.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/187652.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/187652.htmlGoogle Earth坐标Q美国航I母舰坐?/h2>

  q里|列了已l发现的所有美国现役和退役的航空母舰。其中包括:

  “鹰”?CV63  35°17'29.66"N,139°39'43.67"E

  “肯尼q?#8221;?CVN67  30°23'50.91"N, 81°24'14.86"W

  “米?#8221;?CVN68  32°42'47.88"N,117°11'22.49"W

  “艾森豪威?#8221;?CVN69  36°57'27.13"N, 76°19'46.35"W

  “林肯” ?CVN72   47°58'53.54"N,122°13'42.94"W

  “华盛?#8221;?CVN73  36°57'32.90"N, 76°19'45.10"W

  “杜鲁?#8221;?CVN75  36°48'53.25"N,76°17'49.29"W

  “无畏”?CV-11   40°45'53.88"N,74° 0'4.22"W

  “莱克星顿”?CV-2  27°48'54.13"N,97°23'19.65"W

  “星”?47°33'11.30"N,122°39'17.24"W

  “独立”?47°33'7.53"N,122°39'30.13"W

  “渔R?#8221;?47°33'10.63"N,122°39'9.53"W

  “佛瑞斯特”号和“萨拉托加”受41°31'39.59"N,71°18'58.70"W

  “利?#8221;受39°53'6.36"N,75°10'45.55"W



polly 2012-08-19 10:34 发表评论
]]>
国军航空母舰列表http://www.shnenglu.com/polly-yang/archive/2012/08/19/187651.htmlpollypollySun, 19 Aug 2012 02:33:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/08/19/187651.htmlhttp://www.shnenglu.com/polly-yang/comments/187651.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/08/19/187651.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/187651.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/187651.html本列表收录了国军己退Ҏ现役中的航空母舰Q包?a class="mw-redirect" title="国军C~号" >船属于CV、CVA、CVB、CVL或CVN的全部舰只。编号在CVA-58之后的都属于航空母舰Q?a title="排水? >排水?/a>过75,000吨)QCVN-65和CVN-68以后的都属于核动力航I母?/a>?/p>

排水量较的护航航空母舰QEscort Aircraft CarriersQCVEQ,则另行收录于国军护航航空母舰列表中?/p>
船舰~号 舰名 U别 附注
CV-1 Langley 兰利?/a> 以运煤舰朱比特号QUSS JupiterQ改造而成
CV-2 Lexington 列克星敦?/a> 5??/a>CV-3 Saratoga 萨拉托加?/a> 列克星敦U?/td> 7?5?/a>?a title="比基环C? >比基环C?/a>的核子武器试验中沉没
CV-4 Ranger H击者号 H击者 10?8?/a>退?/td>
CV-5 Yorktown U克城号 U克城 6??/a>?a title="中途岛h" >中途岛h中沉?/td>
CV-6 Enterprise 企业?/a> U克城 2?7?/a>退?/td>
CV-7 Wasp 胡蜂?/a> 9?5?/a>?a class="mw-redirect" title="日军" >日军潜艇L
CV-8 Hornet 大黄蜂号 U克城 10?7?/a>?a title="圣克鲁斯岛战役" >圣克鲁斯岛战役中受重创沉没
CV-9 Essex 6?0?/a>退?/td>
CV-10 Yorktown U克城号 埃塞克斯U?/td> 6?7?/a>退?/td>
CV-11 Intrepid 埃塞克斯U?/td> 3?5?/a>退?/td>
CV-12 Hornet 大黄蜂号 埃塞克斯U?/td> 6?4?/a>退?/td>
CV-13 Franklin 埃塞克斯U?/td> 2?7?/a>退?/td>
CV-14 Ticonderoga 提康L加号 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-15 Randolph 伦道夫号 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-16 Lexington 列克星敦?/a> 埃塞克斯U?/td> 11??/a>退?/td>
CV-17 Bunker Hill 邦克山号 埃塞克斯U?/td> 1??/a>退?/td>
CV-18 Wasp 胡蜂?/a> 埃塞克斯U?/td> 7??/a>退?/td>
CV-19 Hancock 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-20 Bennington 本宁号 埃塞克斯U?/td> 1?5?/a>退?/td>
CV-21 Boxer 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CVL-22 Independence 独立?/a> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-23 Princeton 普林斯顿?/a> 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-24 Belleau Wood 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-25 Cowpens U本斯号 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-26 Monterey 蒙特利号 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-27 Langley 兰利?/a> 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-28 Cabot 卡伯特号 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-29 Bataan 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CVL-30 San Jacinto 独立U?/td> ?#8220;克里夫兰U轻巡洋?#8221;改装而成
CV-31 Bon Homme Richard 好h理查德号 埃塞克斯U?/td> 7??/a>退?/td>
CV-32 Leyte 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-33 Kearsarge 奇沙d 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-34 Oriskany 奥里斯卡号 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-35 Reprisal 埃塞克斯U?/td> 建造中途取?/td>
CV-36 Antietam 安提坦号 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-37 Princeton 普林斯顿?/a> 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-38 Shangri-la 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-39 Lake Champlain 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-40 Tarawa 塔拉瓦号 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CVB-41 Midway 中途岛U?/a> 4?1?/a>退?/td>
CVB-42 Franklin D. Roosevelt 中途岛U?/td>
CVB-43 Coral Sea 中途岛U?/td>
CVB-44 ?/td> 建造计划取?/td>
CV-45 Valley Forge 吉谷号 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CV-46 Iwo Jima 磺岛号 埃塞克斯U?/td> 建造计划取?/td>
CV-47 Philippine Sea 埃塞克斯U?/td> 长舰体埃塞克斯QLong-hull EssexQ?/td>
CVL-48 Saipan 1?4?/a> 正式除役
CVL-49 Wright q?/a> 塞班岛 5?7?/a> 正式除役
CV-50到CV-55 ?/td> 埃塞克斯U?/td> 建造计划取?/td>
CVB-56到CVB-57 ?/td> 中途岛U?/td> 建造中途取?/td>
CVA-58 United States 建造中途取?/td>
CVA-59 Forrestal 莱斯特U?/a> 9?1?/a> 正式除役
CVA-60 Saratoga 莱斯特U?/td> 8?0?/a> 正式除役
CVA-61 Ranger 莱斯特U?/td> 7?0?/a> 正式除役
CV-62 Independence 莱斯特U?/td> 9?0?/a> 正式除役
CV-63 Kitty Hawk 5?2?/a> 正式除役
CV-64 Constellation 鹰U?/td> 8??/a> 正式除役
CVN-65 Enterprise 企业?/a> 企业U?/td> 服役?/td>
CVA-66 America 鹰U?/td> 8??/a> 正式除役
CV-67 John F. Kennedy Q改良)鹰U?/td> 8??/a> 正式除役
CVN-68 Nimitz 米兹号 服役?/td>
CVN-69 Dwight D. Eisenhower 艾森豪威号 米兹 服役?/td>
CVN-70 Carl Vinson 米兹 服役?/td>
CVN-71 Theodore Roosevelt |斯号 米兹 服役?/td>
CVN-72 Abraham Lincoln 米兹 服役?/td>
CVN-73 George Washington 华盛号 米兹 服役?/td>
CVN-74 John C. Stennis 米兹 服役?/td>
CVN-75 Harry S. Truman 杜鲁门号 米兹 服役?/td>
CVN-76 Ronald Reagan 米兹 服役?/td>
CVN-77 George H. W. Bush 米兹 服役?/td>
CVN-78 Gerald R. Ford 建造中
CVN-79 John F. Kennedy 肯尼q号 特U?/td> 建造中
CVN-80 未命?/a> 特U?/td> 计划?/td>


polly 2012-08-19 10:33 发表评论
]]>
高光谱,多光谱,光?/title><link>http://www.shnenglu.com/polly-yang/archive/2012/08/10/186806.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Fri, 10 Aug 2012 02:42:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2012/08/10/186806.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/186806.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2012/08/10/186806.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/186806.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/186806.html</trackback:ping><description><![CDATA[<p align="left">高光谱成像是C代光甉|技术,兴v?O世纪8Oq代Q目前仍在迅猛发展巾。高光谱成像是相对多光谱成像而言Q通过高光谱成像方法获得的高光谱图像与通过多光谱成像获取的多光谱图像相比具有更丰富的图像和光谱信息。如果根据传感器的光谱分辨率对光谱成像技术进行分c,光谱成像技术一般可分成3cR?/p> <p align="left"> <wbr></p> <p align="left">(1) <wbr> 多光谱成?#8212;—光谱分L率在 delta_lambda/lambda=0Q?数量U,q样的传感器在可见光和近U外区域一般只有几个LDc?/p> <p align="left"> <wbr></p> <p align="left">(2) <wbr> 高光谱成?#8212;— 光谱分L率在 delta_lambda/lambda=0Q?1数量U,q样的传感器在可见光和近U外区域有几卜到数百个LD,光谱分L率可达nmU?/p> <p align="left"> <wbr></p> <p align="left">(3) <wbr> 光谱成?#8212;— 光谱分L率在delta_lambda/lambda =OQ?01数量U,q样的传感器在可见光和近U外区域可达数千个LDc?/p> <p align="left"> <wbr></p> <p align="left">众所周知Q光谱分析是自然U学中一U重要的研究手段Q光谱技术能到被测物体的物理结构、化学成分等指标。光phZҎ量,而图像测量是ZI间Ҏ变化,两者各有其优缺炏V因此,可以说光谱成像技术是光谱分析技术和囑փ分析技术发展的必然l果Q是二者完结合的产物。光谱成像技术不仅具有光谱分辨能力,q具有图像分辨能力,利用光谱成像技术不仅可以对待检物体进行定性和定量分析Q而且q能q对其进行定位分析?/p> <p align="left"> <wbr></p> <p align="left">高光谱成像系l的主要工作部g是成像光׃AQ它是一U新型传感器Q?O世纪8Oq代初正式开始研Ӟ研制q类仪器的目的是取大量窄波段q箋光谱囑փ数据Q每个像元h几乎q箋的光谱数据。它是一pd光L波长处的光学囑փQ通常包含数十到数百个波段Q光谱分辨率一般ؓ1~l0nm。由于高光谱成像所获得的高光谱囑փ能对囑փ中的每个像素提供一条几乎连l的光谱曲线Q其在待物上获得空间信息的同时又能获得比多光谱更ؓ丰富光谱数据信息Q这些数据信息可用来生成复杂模型Q来q行判别、分cR识别图像中的材料?/p> <p align="left"> <wbr></p> <p align="left">通过高光谱成像获取待物的高光谱囑փ包含了待物的丰富的I间、光谱和辐射三重信息。这些信息不仅表C</p> <p align="left">地物I间分布的媄像特征,同时也可能以其中某一像元或像元组为目标获取它们的辐射强度以及光谱特征。媄像、辐与光谱是高光谱囑փ中的3个重要特征,q?个特征的有机l合是高光谱图像?/p> <p align="left"> <wbr></p> <p align="left">高光谱图像数据ؓ数据立方?cube)。通常囑փ像素的横坐标和纵坐标分别用z和Y来表C,光谱的L长信息以(Z卌u)表示。该数据立方体由沿着光谱轴的以一定光谱分辨率间隔的连l二l图像组成?/p><img src ="http://www.shnenglu.com/polly-yang/aggbug/186806.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2012-08-10 10:42 <a href="http://www.shnenglu.com/polly-yang/archive/2012/08/10/186806.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>vs + opencv 常见错误http://www.shnenglu.com/polly-yang/archive/2012/07/30/185613.htmlpollypollyMon, 30 Jul 2012 03:57:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/07/30/185613.htmlhttp://www.shnenglu.com/polly-yang/comments/185613.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/07/30/185613.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/185613.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/185613.htmlA:应将解决Ҏq_改ؓwin64?br />工具栏上方的解决Ҏq_—》点M拉菜?#8212;》配|管理器—》活动解x案^?#8212;》新?#8212;》键入获选着新^?#8212;》x64
问题p军_Q哈哈!



QQError C1189 Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
A:Go to the project properties (Project menu, Properties).  Set 'Use of MFC' to "Use MFC in a Shared DLL".  You have to make this change for both the debug and release configurations

polly 2012-07-30 11:57 发表评论
]]>
舰船初?/title><link>http://www.shnenglu.com/polly-yang/archive/2012/07/25/185048.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Wed, 25 Jul 2012 11:02:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2012/07/25/185048.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/185048.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2012/07/25/185048.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/185048.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/185048.html</trackback:ping><description><![CDATA[法效率Q先验特征,法框架本周搞定?img src ="http://www.shnenglu.com/polly-yang/aggbug/185048.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2012-07-25 19:02 <a href="http://www.shnenglu.com/polly-yang/archive/2012/07/25/185048.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Bilateral Filtering for Gray and Color Imageshttp://www.shnenglu.com/polly-yang/archive/2012/07/24/184893.htmlpollypollyTue, 24 Jul 2012 12:39:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/07/24/184893.htmlhttp://www.shnenglu.com/polly-yang/comments/184893.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/07/24/184893.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/184893.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/184893.html
  • Introduction
  • The Idea
  • The Gaussian Case
  • Experiments with Black-and-White Images
  • Experiments with Color Images
  • References
  • Introduction

    Filtering is perhaps the most fundamental operation of image processing and computer vision. In the broadest sense of the term "filtering", the value of the filtered image at a given location is a function of the values of the input image in a small neighborhood of the same location. For example, Gaussian low-pass filtering computes a weighted average of pixel values in the neighborhood, in which the weights decrease with distance from the neighborhood center. Although formal and quantitative explanations of this weight fall-off can be given, the intuition is that images typically vary slowly over space, so near pixels are likely to have similar values, and it is therefore appropriate to average them together. The noise values that corrupt these nearby pixels are mutually less correlated than the signal values, so noise is averaged away while signal is preserved.
    The assumption of slow spatial variations fails at edges, which are consequently blurred by linear low-pass filtering. How can we prevent averaging across edges, while still averaging within smooth regions?
    Many efforts have been devoted to reducing this undesired effect. Bilateral filtering is a simple, non-iterative scheme for edge-preserving smoothing.

    Back to Index

    The Idea

    The basic idea underlying bilateral filtering is to do in the range of an image what traditional filters do in its domain. Two pixels can be close to one another, that is, occupy nearby spatial location, or they can be similar to one another, that is, have nearby values, possibly in a perceptually meaningful fashion.
    Consider a shift-invariant low-pass domain filter applied to an image:

    The bold font for
    f and h emphasizes the fact that both input and output images may be multi-band. In order to preserve the DC component, it must be

    Range filtering is similarly defined:

    In this case, the kernel measures the
    photometric similarity between pixels. The normalization constant in this case is

    The spatial distribution of image intensities plays no role in range filtering taken by itself. Combining intensities from the entire image, however, makes little sense, since the distribution of image values far away from
    x ought not to affect the final value at x. In addition, one can show that range filtering without domain filtering merely changes the color map of an image, and is therefore of little use. The appropriate solution is to combine domain and range filtering, thereby enforcing both geometric and photometric locality. Combined filtering can be described as follows:

    with the normalization

    Combined domain and range filtering will be denoted as
    bilateral filtering. It replaces the pixel value at x with an average of similar and nearby pixel values. In smooth regions, pixel values in a small neighborhood are similar to each other, and the bilateral filter acts essentially as a standard domain filter, averaging away the small, weakly correlated differences between pixel values caused by noise. Consider now a sharp boundary between a dark and a bright region, as in figure 1(a).

    (a)

    (b)

    (c)

    Figure 1

    When the bilateral filter is centered, say, on a pixel on the bright side of the boundary, the similarity function
    s assumes values close to one for pixels on the same side, and values close to zero for pixels on the dark side. The similarity function is shown in figure 1(b) for a 23x23 filter support centered two pixels to the right of the step in figure 1(a). The normalization term k(x) ensures that the weights for all the pixels add up to one. As a result, the filter replaces the bright pixel at the center by an average of the bright pixels in its vicinity, and essentially ignores the dark pixels. Conversely, when the filter is centered on a dark pixel, the bright pixels are ignored instead. Thus, as shown in figure 1(c), good filtering behavior is achieved at the boundaries, thanks to the domain component of the filter, and crisp edges are preserved at the same time, thanks to the range component.

    Back to Index

    The Gaussian Case

    A simple and important case of bilateral filtering is shift-invariant Gaussian filtering, in which both the closeness function c and the similarity function s are Gaussian functions of the Euclidean distance between their arguments. More specifically, c is radially symmetric:

    where

    is the Euclidean distance. The similarity function
    s is perfectly analogous to c :

    where

    is a suitable measure of distance in intensity space. In the scalar case, this may be simply the absolute difference of the pixel difference or, since noise increases with image intensity, an intensity-dependent version of it. Just as this form of domain filtering is shift-invariant, the Gaussian range filter introduced above is insensitive to overall additive changes of image intensity. Of course, the range filter is shift-invariant as well.

    Back to Index

    Experiments with Black-and-White Images

    Figure 2 (a) and (b) show the potential of bilateral filtering for the removal of texture. The picture "simplification" illustrated by figure 2 (b) can be useful for data reduction without loss of overall shape features in applications such as image transmission, picture editing and manipulation, image description for retrieval.

    (a)

    (b)

    Figure 2

    Bilateral filtering with parameters sd =3 pixels and sr =50 intensity values is applied to the image in figure 3 (a) to yield the image in figure 3 (b). Notice that most of the fine texture has been filtered away, and yet all contours are as crisp as in the original image. Figure 3 (c) shows a detail of figure 3 (a), and figure 3 (d) shows the corresponding filtered version. The two onions have assumed a graphics-like appearance, and the fine texture has gone. However, the overall shading is preserved, because it is well within the band of the domain filter and is almost unaffected by the range filter. Also, the boundaries of the onions are preserved.

    (a)

    (b)

     

     

     

     

    (c)

    (d)

    Figure 3

    Back to Index

    Experiments with Color Images

    For black-and-white images, intensities between any two gray levels are still gray levels. As a consequence, when smoothing black-and-white images with a standard low-pass filter, intermediate levels of gray are produced across edges, thereby producing blurred images. With color images, an additional complication arises from the fact that between any two colors there are other, often rather different colors. For instance, between blue and red there are various shades of pink and purple. Thus, disturbing color bands may be produced when smoothing across color edges. The smoothed image does not just look blurred, it also exhibits odd-looking, colored auras around objects.

    (a)

    (b)

    (c)

    (d)

    Figure 4

    Figure 4 (a) shows a detail from a picture with a red jacket against a blue sky. Even in this unblurred picture, a thin pink-purple line is visible, and is caused by a combination of lens blurring and pixel averaging. In fact, pixels along the boundary, when projected back into the scene, intersect both red jacket and blue sky, and the resulting color is the pink average of red and blue. When smoothing, this effect is emphasized, as the broad, blurred pink-purple area in figure 4 (b) shows.
    To address this difficulty, edge-preserving smoothing could be applied to the red, green, and blue components of the image separately. However, the intensity profiles across the edge in the three color bands are in general different. Smoothing the three color bands separately results in an even more pronounced pink and purple band than in the original, as shown in figure 4 (c). The pink-purple band, however, is not widened as in the standard-blurred version of figure 4 (b).
    A much better result can be obtained with bilateral filtering. In fact, a bilateral filter allows combining the three color bands appropriately, and measuring photometric distances between pixels in the combined space. Moreover, this combined distance can be made to correspond closely to perceived dissimilarity by using Euclidean distance in the
    CIE-Lab color space. This color space is based on a large body of psychophysical data concerning color-matching experiments performed by human observers. In this space, small Euclidean distances are designed to correlate strongly with the perception of color discrepancy as experienced by an "average" color-normal human observer. Thus, in a sense, bilateral filtering performed in the CIE-Lab color space is the most natural type of filtering for color images: only perceptually similar colors are averaged together, and only perceptually important edges are preserved. Figure 4 (d) shows the image resulting from bilateral smoothing of the image in figure 4 (a). The pink band has shrunk considerably, and no extraneous colors appear.

    (a)

    (b)

    (c)

    Figure 5

    Figure 5 (c) shows the result of five iterations of bilateral filtering of the image in figure 5 (a). While a single iteration produces a much cleaner image (figure 5 (b)) than the original, and is probably sufficient for most image processing needs, multiple iterations have the effect of flattening the colors in an image considerably, but without blurring edges. The resulting image has a much smaller color map, and the effects of bilateral filtering are easier to see when displayed on a printed page. Notice the cartoon-like appearance of figure 5 (c). All shadows and edges are preserved, but most of the shading is gone, and no "new" colors are introduced by filtering.

    Back to Index

    References

    [1] C. Tomasi and R. Manduchi, "Bilateral Filtering for Gray and Color Images", Proceedings of the 1998 IEEE International Conference on Computer Vision, Bombay, India.
    [2] T. Boult, R.A. Melter, F. Skorina, and I. Stojmenovic,"G-neighbors",
    Proceedings of the SPIE Conference on Vision Geometry II, pages 96-109, 1993.
    [3] R.T. Chin and C.L. Yeh, "Quantitative evaluation of some edge-preserving noise-smoothing techniques",
    Computer Vision, Graphics, and Image Processing, 23:67-91, 1983.
    [4] L.S. Davis and A. Rosenfeld, "Noise cleaning by iterated local averaging",
    IEEE Transactions on Systems, Man, and Cybernetics, 8:705-710, 1978.
    [5] R.E. Graham, "Snow-removal - a noise-stripping process for picture signals",
    IRE Transactions on Information Theory, 8:129-144, 1961.
    [6] N. Himayat and S.A. Kassam, "Approximate performance analysis of edge preserving filters",
    IEEE Transactions on Signal Processing, 41(9):2764-77, 1993.
    [7] T.S. Huang, G.J. Yang, and G.Y. Tang, "A fast two-dimensional median filtering algorithm",
    IEEE Transactions on Acoustics, Speech, and Signal Processing, 27(1):13-18, 1979.
    [8] J.S. Lee, "Digital image enhancement and noise filtering by use of local statistics",
    IEEE Transactions on Pattern Analysis and Machine Intelligence, 2(2):165-168, 1980.
    [9] M. Nagao and T. Matsuyama, "Edge preserving smoothing",
    Computer Graphics and Image Processing, 9:394-407, 1979.
    [10] P.M. Narendra, "A separable median filter for image noise smoothing",
    IEEE Transactions on Pattern Analysis and Machine Intelligence, 3(1):20-29, 1981.
    [11] K.J. Overton and T.E. Weymouth, "A noise reducing preprocessing algorithm",
    Proceedings of the IEEE Computer Science Conference on Pattern Recognition and Image Processing, pages 498-507, Chicago, IL, 1979.
    [12] P. Perona and J. Malik, "Scale-space and edge detection using anisotropic diffusion",
    IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(7):629-639, 1990.
    [13] G. Ramponi, "A rational edge-preserving smoother",
    Proceedings of the International Conference on Image Processing, volume 1, pages 151-154, Washington, DC, 1995.
    [14] G. Sapiro and D.L. Ringach, "Anisotropic diffusion of color images",
    Proceedings of the SPIE, volume 2657, pages 471-382, 1996.
    [15] D.C.C. Wang, A.H. Vagnucci, and C.C. Li, "A gradient inverse weighted smoothing scheme and the evaluation of its performance",
    Computer Vision, Graphics, and Image Processing, 15:167-181, 1981.
    [16] G. Wyszecki and W. S. Styles,
    Color Science: Concepts and Methods, Quantitative Data and Formulae, John Wiley and Sons, New York, NY, 1982.
    [17] L. Yin, R. Yang, M. Gabbouj, and Y. Neuvo, "Weighted median filters: a tutorial",IEEE
    Transactions on Circuits and Systems II: Analog and Digital Signal Processing, 43(3):155-192, 1996.



    polly 2012-07-24 20:39 发表评论
    ]]>
    CString ?string ?const char*、int、double之间的相互{?/title><link>http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Tue, 24 Jul 2012 12:34:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/184890.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/184890.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/184890.html</trackback:ping><description><![CDATA[<p><span style="font-family: Times New Roman; font-size: 14pt">我们在写E序Ӟ常常会遇到类型{换的问题。现ȝ一些常见的cd转换?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">1Qconst char*QC风格字符Ԍ与string之间转换Q?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">             Q?Q?const char*可以直接对stringcd赋|例如Q?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       const char* pchar = "qwerasdf";</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       stringstr = pchar;</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">             Q?Q?string通过c_str()函数转换为C风格字符Ԍ例如Q?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       string str = "qwerasdf";</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       const char* pchar = str.c_str();</span></p> <p><span style="font-size: 18px"></span> </p> <p><span style="font-family: Times New Roman; font-size: 14pt">2Qconst char*cd可以直接lCStringcd赋|例如Q?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">               const char* pchar = "qwerasdf";</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">               CString str = pchar;</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">3Qstringcd变量转ؓ为Cstringcd变量</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">             CStringcd变量可以直接lstringcd变量赋|但是stringcd不能对CStringcd直接赋倹{通过前两c?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      转换我们可以得到Q?/span><span style="font-family: Times New Roman; font-size: 14pt">stringcd变量转换为const char*cdQ然后再直接赋值就可以了。例如:</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">       CString cstrQ?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">       sring str = “asdasd”Q?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">       cstr = str.c_str();</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      同理QCStrngcd变量先{换ؓstringcd在调用c_str()函数可以完成向</span><span style="font-family: Times New Roman; font-size: 14pt">const char*cd的{换。例如:</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      CString cStr = "adsad";</span><span style="font-size: 18px">   </span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      string str = cStr;  </span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      const char* pchar = str.c_str();<br /></span><span style="font-family: Times New Roman; font-size: 14pt">4QdoubleQint转string<br /></span></p> <p><span style="font-size: 18px"></span>      <span style="font-family: Times New Roman; font-size: 14pt">double temp;</span><br />   <span style="font-family: Times New Roman; font-size: 14pt">stringstream strStream;</span><br />   <span style="font-family: Times New Roman; font-size: 14pt">strStream<<temp;</span><br />   <span style="font-family: Times New Roman; font-size: 14pt">string ss = strStream.str()</span> <br /><br /><span style="font-family: Times New Roman; font-size: 14pt">   string 转doubleQint </span><br /><span style="font-family: Times New Roman; font-size: 14pt">   string.atoi   ,   string.atof</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">     从上面我们可以上面看出,通过cd之间的相互{化,会本来要通过复杂的函数来完成的类型{换变得简单易懂?/span></p><img src ="http://www.shnenglu.com/polly-yang/aggbug/184890.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2012-07-24 20:34 <a href="http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.xinmeige.com.cn" target="_blank">97þóƷ2021</a>| <a href="http://www.chaonengtiyu.cn" target="_blank">þþƷ޸</a>| <a href="http://www.918gn.cn" target="_blank">ƷŮþþ</a>| <a href="http://www.jrbjh.cn" target="_blank">ŷ龫Ʒþþþ</a>| <a href="http://www.832821.cn" target="_blank">ɫۺϾþĻۺ</a>| <a href="http://www.kaoyanonline.cn" target="_blank">þĻƷһ</a>| <a href="http://www.e9920.cn" target="_blank">ž99Ʒþþþþ</a>| <a href="http://www.fuzd88.cn" target="_blank">þ޾ƷƷ</a>| <a href="http://www.tja4.cn" target="_blank">99þþƷһ</a>| <a href="http://www.520chuanqi.cn" target="_blank">þþþ99ƷƬţţӰ</a>| <a href="http://www.damingxing.cn" target="_blank">ƷþþþþĻ</a>| <a href="http://www.smtch.cn" target="_blank"> þۺϺݺۺϾþü </a>| <a href="http://www.dr-knoell-consult.com.cn" target="_blank">þþƷԴվ</a>| <a href="http://www.haolepay.cn" target="_blank">99þֻоƷ</a>| <a href="http://www.bellesmontres.cn" target="_blank">޹ŷۺϾþ</a>| <a href="http://www.0898qc.cn" target="_blank">ۺۺϾþ69</a>| <a href="http://www.fragmentdesign.cn" target="_blank">þ×Ʒþþþþ</a>| <a href="http://www.licaidazhong.com.cn" target="_blank">þþþAV </a>| <a href="http://www.e-meng.com.cn" target="_blank">þþþavר</a>| <a href="http://www.ominimo.cn" target="_blank">seguiþùƷ</a>| <a href="http://www.847888.com.cn" target="_blank">鶹һ99þþþ</a>| <a href="http://www.jcfw-1.cn" target="_blank">þɫۺһ</a>| <a href="http://www.aamih.cn" target="_blank">þþĻ</a>| <a href="http://www.bestlevering.cn" target="_blank">þۺۺϾþ97ɫ</a>| <a href="http://www.carswg.cn" target="_blank">2021ƷۺϾþ</a>| <a href="http://www.lushihu.cn" target="_blank">þۺϺݺۺϾþ</a>| <a href="http://www.vqzt.cn" target="_blank">㽶þavһ</a>| <a href="http://www.shuangfengjixie.com.cn" target="_blank">޹˾þۺһ77</a>| <a href="http://www.symedia.com.cn" target="_blank">wwwɫ˾þþƷ</a>| <a href="http://www.ajchugui.cn" target="_blank">aaþ</a>| <a href="http://www.6talent.cn" target="_blank">ձһƷþþþӰԺ</a>| <a href="http://www.cycn168.cn" target="_blank">Ʒһþ㽶߿ۿ </a>| <a href="http://www.worldedu.org.cn" target="_blank">ɫۺϾþ</a>| <a href="http://www.yuyingfus.cn" target="_blank">þ99һ</a>| <a href="http://www.fbmz5.cn" target="_blank">ƷŮͬþþþõӰԺ</a>| <a href="http://www.qh298.cn" target="_blank">ɫۺϾþþþۺһ</a>| <a href="http://www.upvd.cn" target="_blank">þþ뾫ƷպĦ</a>| <a href="http://www.bjscqh.com.cn" target="_blank">˾þô߽av</a>| <a href="http://www.x6844.cn" target="_blank">þþþAV鶹</a>| <a href="http://www.hfdsbw.cn" target="_blank">ݺݺɫۺϾþ</a>| <a href="http://www.xkart.cn" target="_blank">WWWAVþþӰƬ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>