My Blog List

Tuesday, February 28, 2012

关于Matlab找不到vs2008或vs2005编译器的解决办法

http://blog.csdn.net/zokie/article/details/6240088

机器上安装了matlab2009a和vs2008 ,今天想要编译一个工具箱,可是在运行mex -setup是只有一个matlab自带的Lcc可选。在网上找了很久,原来是matlab在识别vs的编译器时,使用的是"version"英文,而vs08显示的版本信息是"优化编译器"五个汉字,匹配不上,所以找不到。

解决办法很简单(虽然找了很久),用记事本打开matlab/r2009a/bin/mexsetup.pm文件,找到 correc_version函数(第477行),将这个函数中的return ($version =~ /Version.$versionNumber/i);改成return ($version =~ /优化编译器.$versionNumber/i);即可。

Thursday, February 23, 2012

在windows下运行Felzenszwalb的Discriminatively Trained Deformable Part Models matlab代码

http://blog.csdn.net/pozen/article/details/7023742


Felzenszwalb的Discriminatively Trained Deformable Part Models  URL:http://www.cs.brown.edu/~pff/latent/

据说是目前最好的object detection method。我自己试了一下,效果真的不错。不过代码只可以在unix/linux/mac上运行。

(Pascal voc 近两届obj detection冠军的方法都是基于此框架的,但是别人的研究是不公开的,顺便表示一下不满)

但是呢,只要稍作修改就可以在windows上跑啦:

1,dt.cc 添加一句:#define int32_t  int

2,features.cc &  resize.cc中添加:

     #define bzero(a, b) memset(a, 0, b) 
     int round(float a) { float tmp = a - (int)a; if( tmp >= 0.5 ) return (int)a + 1; else return (int)a; }

3,resize.cc中:  alphainfo ofs[len]; 这句改成:alphainfo *ofs = new alphainfo[len];  当然在同一作用域后面加上:delete []ofs

4,compile.m中:结尾加上mex -O fconv.cc

% use one of the following depending on your setup
% 1 is fastest, 3 is slowest

% 1) multithreaded convolution using blas
% mex -O fconvblas.cc -lmwblas -O fconv
% 2) mulththreaded convolution without blas
% mex -O fconvMT.cc -o fconv
% 3) basic convolution, very compatible
% mex -O fconv.cc -o fconv
mex -O fconv.cc

其他几个fconv用了其他平台的multiThread在windows上跑不起!

 

改了上边的几个地方后,就可以运行了。跑demo.m看效果吧,,,

Thursday, February 9, 2012

Connect to Ubuntu 11.04 from Windows via Remote Desktop

From: http://www.liberiangeek.net/2011/06/connect-to-ubuntu-11-04-from-windows-via-remote-desktop/



Last week we showed you how to use Remote Desktop Protocol (RDP) to connect from Ubuntu to Windows 7. Today, I will show you how to use the same Remote Desktop Protocol to connect from Windows to Ubuntu 11.04 Natty Narwhal. If you ever wanted to connect to Ubuntu via Remote Desktop Connection, then this tutorial will help you do that.
There are many ways to connect to Ubuntu from Windows and RDP protocol is just one of the many ways.

Getting started:

To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When Terminal opens, type the command below to install xrdp server.
 
 sudo apt-get install xrdp
natty_xrdp

Ubuntu PIL JPEG support

from: http://dimamoroz.com/blog/3-ubuntu-pil-jpeg-support/


Ubuntu PIL JPEG support


Got an IOError exception, while trying to process image using PIL, with a next error message:

encoder jpeg not available

PIL is installed within python virtual environment. Figured out, I have no development files for libjpeg installed, so PIL compiles without JPEG support.

The solution is to:

$ sudo apt-get install libjpeg62-dev

Notice: 62 is from libjpeg version 6.2, so it may vary.

Finally, recompile PIL:

pip install -U PIL

PIL has JPEG support for now and everything works like a charm.

/*************************************
I also did this before this work:
************************************/

I had the same problem, but I needed to make symbolic links to find the needed libraries:
$ cd /usr/lib
$ sudo ln -s x86_64-linux-gnu/libjpeg.so
$ sudo ln -s x86_64-linux-gnu/libz.so
$ sudo ln -s x86_64-linux-gnu/libfreetype.so

Wednesday, February 8, 2012

How to install the latest stable git release on Ubuntu 10.04 LTS

From http://adammonsen.com/post/665

March 21, 2011

How to install the latest stable git release on Ubuntu 10.04 LTS

Filed under: Default — adam @ 11:39 am PST

I want a very stable desktop, so I'm using Ubuntu 10.04 "lucid lynx" LTS (long-term support). I also want features of the latest version of git. I ran these commands to grab the latest stable git release without futzing with any manual downloading or dpkg.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

Thank you, Anders Kaseorg!

Distribution packages in a release typically lag behind those released by upstream maintainers. This is expected: part of what makes a release stable is intentionally not introducing changes. PPAs (personal package archives) are a handy way to get at packages not already present in the distribution/release you are using. Backports are handy too, but I didn't see the latest git in there for Ubuntu 10.04.

Back in the old days I used to manually scour some combination of rpmfind, DAG, Dries, ATrpms, rpmforge, (and others!) to find the right packages and dependencies.


Tuesday, February 7, 2012

Ubuntu broadcom 4313 无线网卡无法使用的解决办法

用wicd解决了,很好用。

原文地址:http://qiudao.sinaapp.com/?p=185

原文:

Ubuntu broadcom 4313 无线网卡无法使用的解决办法

新安装了ubuntu 11.10,无线网卡无法启用,网上搜寻良久,得到以下解决办法:

sudo rmmod acer-wmi

这样就可以打开无线了!无线信号也会出来 ,但是有一个问题就是,只要机器一重启,那个文件又被修改回来了!

解决每次重启之后文件又自己恢复的方法是:

blacklist acer-wmi
这个命令加入到/etc/modprobe.d/blacklist.conf文件最后即可。

以上解决方法来自:

http://forum.ubuntu.org.cn/viewtopic.php?t=328097

---------无敌分割线---------------------

以下摘录其它的解决方法。经尝试,方法1有用,但得用wicd才能连接,而在系统提示里没有相关的连接信息。

http://www.luochunhui.com/id/1258

在升级ubuntu 11.04之后,无线网卡无法找到了。原本以为是我的个案问题,没有将其解决办法share出来,今天听到另一童鞋也出现了这个问题,于是写下。

升级后症状:
1. 无法连接无线网络,在net manager中显示无线网卡禁用 disabled.
2. 不管怎么按无线网络硬开关或点击启用无线网络,都无法点亮无线网络指示灯。

解决办法:
1. 换一个无线网卡管理器: wicd
sudo apt-get install wicd
接下来 ctrl+F2, 键入wicd,并打开。
在面板中应该可以找到你的无线网卡。启用并连接。

如果在1中还是无法找到无线网卡,则需要进行一下网卡开启设置。

2. 使用rfkill 开启开关:
rfkill list
应该可以看到无线网卡,及其软硬开关状态。如果是hard block为true,则按计算机无线网络硬开关开启(部分机器,如果是在windows进行的硬关闭,则linux无法开启,得回到windows开启 后,再进入linux)。如果soft block为true, 则使用命令开启:
rfkill unblock 0 #0为你的无线网卡编号,在rfkill list中可以看到。

3. 开启网卡
sudo ifconfig wlan0 up
如果遇到 RFKILL错误,重试第二步,并等待2分钟。

4. 回到第一步进行刷新,查看是否找到无线网卡。

在本人机器上,重新启动后,偶尔需要重新设置第2,3步。尚没有自动设置。以上办法仍旧是一个临时方案。
最终还得等待ubuntu官方更新。



Dan XIE