自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

转载 Acronym vs. Initialism

I've noticed an uptake in the use of the word "acronym" in the videos lately, and while acronym is a wonderful word, most of the places it's being used here are actually incorrect, so I thought I'd

2013-04-19 14:54:22 1596

原创 The default parameter of python functions

As I've said in a previous article, every thing in python is a object, maybe there are exceptions, but it's good enough to think in this way at the beginning.          So, function is a object.

2013-04-03 17:52:02 540

原创 python immutable and mutable

When beginning with python, you may probably get involved in the caos caused by the immutable and mutable concepts in python.          Yes, python has no such stuff as pointers as you love so mu

2013-04-03 17:01:03 827

原创 python 'type' - dynamically creating a class

As you may already know, in python, a class is also an object.         If you haven't known this, then you can just imagine everything in python is an object until you figure things out.

2013-04-03 10:06:32 584

原创 Logical shift and Arithmetic shift

In most C or C++ compiler, arithmetic shift are adopted.      With this, negative number shifting may first looks a little out of routine, or at least that's how I felt.     In brief, arithmet

2013-04-02 11:38:19 2017

原创 Duck Typing

Python is a duck-typed language.Duck typing is a style of dynamic typing in which an object's methods and properties determine the valid semantics, rather than the inheritance from a specificc

2013-04-01 08:59:46 504

原创 函数指针

函数指针 说到底还是 指针。    只是 他的 声明 要比 一般至真麻烦些:       void  *( *func) (int,float);     上面 这个, 定义 func 是一个 函数指针, 它指向的函数 要 接受 参数 (int, float), 并返回 一个 void * 的 返回值。      一个简单例子: #include  void hel

2013-03-29 15:12:11 356

原创 python alarm

import timeimport tkMessageBoxstime = time.time()while time.time() - stime time.sleep(2) #I prefer it sleeps longer.else:tkMessageBox.askquestion("Delete", "Time up",  icon="warnin

2013-03-29 09:39:24 1682

原创 Interactive Segmentation Tool-Box

过去半个多月大多时间一直在研究 A.Levin的 closed-form solution to image matting.       个人对于其数学推导过程现在还是一知半解。而且,即使使用了 作者在 eigenvectors as guide 一节中所述的 方法后,发现抠图结果也不是很好。 我个人感觉这个算法对 涂鸦的位置 要求 有些高, 事实上,我个人 涂鸦的 图片从来都无法产生正

2013-03-27 17:56:14 814

原创 ctime pitfall

We can get the time information of a file from python using the following code:1.        import os.path, time       modify_time = time.ctime(os.path.getmtime(file))       create_time = tim

2013-03-26 17:59:37 682

原创 学习 closed-form solution image matting

最近 在 学习 抠图, 网上 找到 不少资料     抠图 需要 一定的 交互 操作: 一般 需要 一个  trimap 或 一些 scribble          trimap是在 原图上,把前景(目标区域) 背景 以及 相交 部分 用 不同 的 颜色 笔试出来(一般为 白,黑,灰), 需要trimap的 这类算法 只需要    利用 前景 和 背景 中 提供的 信息 来 处理 交

2013-03-22 18:33:08 3755 2

原创 一个python 小游戏

学习 python 一段时间。 今天 练习做了个 贪吃蛇, 一共才 150 多行。             把代码贴这里了。(有没有方法打包传上来呢? )这个是 主程序 run.pyfrom Tkinter import *from modsfd import snakefrom modsfd import foodfrom time import sleep

2013-03-22 17:30:47 626

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除