How to make QT make works on Snow Leopard

The title is quite award. Hehe. A couple of days ago, I planned to use QT to build some stuff. But I found it counld not find “make” cmd on my snow leopard. I searched a lot; but only found Qs, no As. Some suggested to install XCode (which gives your OS “make”). But I have already installed the latest Xcode.  How come?

At last, I re-installed Xcode. And it works now!

I notice that there wasn’t “make” cmd in my /usr/bin/ path, but one in /Developer/usr/bin/. So I even tried to add a ~/.bash_profile with “export PATH=$PATH:/Developer/usr/bin/” to use make in Terminal. But QT Creator still didn’t work. After I re-installed XCode from the Snow Leopard Disc. I got “make” back inside /usr/bin/.

Tags:

Comments(0)

Demo of Digital Face Makeup to LucasFilm

Today I showed a demo to some high-level officers of Lucasfilm. I demoed my makeup work which was published in CVPR 09.

The code stays untouched from the time I submitted my paper, until recently my boss asked my to build GUI for the demo to Lucasfilm visitors. I picked up my code and rushed to finish the demo. At last, I included three parts of my work, beauty makeup, makeup from painting, and wrinkles transfer. Because beard transferring part needs manual mark-up of beard region, I didn’t have time to include it as well.

After introduction of each other, I invited one of the visitors, a lady, to take a photo.  Then I did the makeup with my program on her face photo.

“Have you ever tried such a heavy makeup before?” I pointed at the makeup example on the screen and asked her.
“No.”  She replied.
“Today you can have a try. If you like it, you can do it physically; if not, never mind, it’s all virtual.” I added.

When the makeup result showed up, it was great! It was natural and seamless, as if it is real. However, this lady seemed not to like it because she had never worn such a heavy makeup. Nevertheless, the result itself was successful !

Later on, I begun the second step, adding wrinkles.
“Can you remove the wrinkles on my faces?” One gentlemen asked me.
At that moment, I just realised he was a bit elder than the rest and had some wrinkles on his face.
“All right. But it’s better to show adding wrinkles.” I replied.
At last, the a bad thing I did – adding wrinkles to the lady’s face. 
There were deep dimples on her face, so the wrinkles were so obvious. Yet, still the wrinkles looked real.

Next part is makeup from a painting. I transferred a makeup from a famous painting of  Marilyn Monroe. This time, she gotta like it.

I don’t show the results of the visitor’s faces here due to privacy.

If interested, you can visit this site regarding to my Digital Face Makeup by Example:
http://digitalfacemakeup.com

* Comments(2)

Access Data of Another GUI FIg in Matlab

Although matlab GUI is simple, we may still need multiple windows in one app. How to access data of another window is a problem. I searched a lot and encountered this post, http://blinkdagger.com/matlab/matlab-gui-how-to-easily-share-data-between-two-separate-guis/

This post shows a simple yet efficient way to do so. However, not perfect. The code will activate the other window when acquiring the handle of window (put it on the top). So, I suggest a way. Let’s use parent window and child window to describe the two window according to which one opens the other.  Thus, one can keep the child window’s handle in the parent window at the first time of open child window, and at the same time, put parent window’s handle inside the child window so that the child window can access the parent window.

Here, I don’t show the code because I haven’t tried. Anyone tested could send me an example. I will put it here :)

Comments(0)

How to show Image on GUI in matlab

  1. Add an “Axes” control on GUI. Change its tag to “axes_img”.  %% Tag in matlab GUI programming is used as function of name.
  2. Change property of "Axes” visible to “off” to avoid it appearing like an axes in the GUI before image is loaded.
  3. In some functions, like a button clicked, add code similar as below
       axes(handles.axes_img); % use the axes you put on GUI
       imshow('filename');   % display the image

Then an image is loaded where you put the axes control when you click the button.

Comments(0)

只能远离CN域名

CN域名, 从一开放到现在, 从来没有消停过.
开始, 随意注册, 后来1元注册风暴(为了达到一定用户量), 一下子多了n多垃圾站. 导致国际上很多邮件系统都将cn后缀的作为spam的高概率对待.
接下来, 最近, 又出台了, 取消了个人注册资格. 据说已经注册的, 都要补交企业的营业证明等, 那么之前的个人站点居然就这么的就要关闭了.
太牛B了. 这种匪夷所思的事情, 也只有在天朝才能发生.
我觉的, 干脆国家就出台个法律, 所有cn域名均归国家所有, 所有其他企业法人或者个人(现在个人是不可能了)只享有使用权. 就像土地一样, 国家借给你用的, 那么说征收就征收了, 容不得半点商量.
但好歹, 征收土地, 一亩还补贴的若干银子的. 这域名现在确是无条件征收的啊.
之前williamlong.info上三番五次的提醒广大善良的劳动人民远离CN域名, 实在是真知灼见啊.
咱最早的时候抢注的cn域名看来迟早要上缴了. 真是躲得过初一躲不过十五啊.
前不久, 我已经成功的将我最后最后一个在国内的com域名转到的godaddy. 如果这个cn再被征了的话, 我就完全的放弃国内的域名注册商了.
最后, 已经注册cn域名的朋友, 现在就等着征收吧; 没注册的朋友, 推荐直接在国外注册com域名. 别在国内扯了.

update:  9/1/2010, cn域名居然还涨价了, 88块续费! tnnd

Comments(0)

The only keyboard shortcut you need to remember (Mac)

is cmd+? (press cmd+shift+[?/])
It opens help->search textbox. Then you type any command in the menu and press enter to execute.

Hooray!

Comments(0)

用rsync同步

rsync是功能强大的同步工具, 比synctoy之类的强多了. 但命令行的参数太麻烦, 每次用又忘记了, 所以这里整理一下, 方便日后使用

1.拷贝文件, 如果用cp或者scp的话, 所有的文件都会重新覆盖一边, 大量拷贝的时候会太慢. 用rsync就可以先比较再拷贝, 速度快多了.比如我发布本地的网页到服务器上,就可以用

rsync -rlv ~/websites/sitename/ username@server:~/public_html/

-r 是recursive
-l copy symlinks as symlinks
-v increase verbosity
此外还可以用 -u update, 如果服务器上的文件新则跳过.

2.备份照片,视频等. 只需要一个-a 的参数即可

rsync -a --delete ~/Pictures/iPhoto\ Library /Volumes/MG_MAC/iPhoto\ Library/

-a 是archive的意思, 存档, 等效于-rlptgoD, recursive, copy symlinks as symlinks, preserve permissions, 等等.
–delete delete extraneous files from destination dirs是删除备份处已有的多余文件. 这个根据个人需要添加

此外,一个有用的参数是 -u, dry-run, 只是看下都有哪些文件会同步. 但这个参数仍旧会删除多余文件, 所以一定要确保src dest和dest dir都正确的情况下再按下enter.

目前对于我来讲,这两个已经够用了. 用起来也很简单方面. 其他复杂的参数俺也不会. 以后要是有新的tips了俺慢慢加上.

update: 刚发现了个小tip, 在src dir后面如果带”/”,则同步的是这个dir里面的所有文件而不包含该src dir本身;若不带”/”,则同步的是src dir本身. 这个和cp的效果是一样的. 所以,非常重要的是, 如果src dir带”/”,并且用了–delete参数了的话, 则同步完成后dst dir将和src dir一模一样了. 若src dir不带”/”,则同步完成后dst dir将拥有一个目录和src dir一样. 千万别混用,而导致其他文件的丢失.

Comments(0)

Install Visual Studio on Windows 7 x64

Failed thousands of times in the mounted ISO file. (tested vs2008, 2010b2)
Succeeded just after I copied all the files out of the ISO file and ran the setup file. (tested vs2010b2).

Update: 2/2/2010, recently I have tried Pismo File Mount, succeeded. No need to waste time to  copy files out of ISO file.
Also, suggested by #kivin, using latest DAEMON Tools lite to mount ISO can work.

Tags: ,

* Comments(3)

install Canon EOS utility app on Mac without CD

Nobody knows why Canon restricts EOS utility app install only with original CD. Anybody who wanna install such an app owns a Canon camera. But some of them lost their CDs or bought a secondhand camera without CD.

To import Photos from your Canon DSLR, you need either a card reader or this app. Normally Canon only provides an updater of this app online. You have to keep the original CD to run this updater. I occasionally found this post to hack the updater.

First you download the latest updater app from Canon website. Then drag the app to desktop and show its contents. Navigate to Contents > Resources and remove the file “update.plist”. Now you can run this app as a normal installer.

That’s it.

Thanks to the author of this post.

http://www.northlight-images.co.uk/article_pages/install_canon_software.html

Comments(0)

C里mkdir

找了一圈, 坚信c里可以用mkdir, 而不用windows的createDirectory或者MFC的xxxx,

终于找到了, mkdir在 <direct.h>  里有.

记得小时候用TC的时候, 有着强烈的印象C有mkdir的. 没道理找不到的.

表说偶土.

Comments(0)