Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

opencv python cool

µ±Äê×ö±ÏÒµÂÛÎĵÄʱºòopenCV¾ÍÏñÊÇÎÒµÄÈðÊ¿¾üµ¶£¬Ì«ÓиÐÇéÁË¡£Èç½ñÓÃÁËÒ»Äê¶àµÄpython£¬·¢ÏÖopenCVÒ²ÓÐpython°æ±¾ÁË£¬ÕæÊÇÌ«¿áÁË£¡µ±È»pythonÔÚ´¦ÀíͼÏñʱ»¹¿ÉÒÔÓÃÆäËü¿âÀýÈçPIL(Python Imaging Library )£¬Ò»ÖÖÇáÁ¿¼¶µÄͼÏñ¿â¡£Ä¿Ç°openCV1.0°æ±¾¶ÔÓ¦µÄpython°æ±¾Îª2.5£¬openCV2.0¶ÔÓ¦python 2.6¡£
¸½Â¼£º
1. һƪ½éÉÜͼÏñ´¦Àí¿âÊÇ PIL(Python Image Library)µÄblog:
http://blog.csdn.net/lanphaday/archive/2007/10/28/1852726.aspx
2. openCV¼ò½é
OpenCVÈ«³Ìopen source computer vision library.ÊÇIntel¿ª·¢µÄÒ»¸ö¼ÆËã»úÊÓ¾õ¿â£¬°üº¬Á˶àÖÖ¼ÆËã»úͼÐÎͼÏñ´¦ÀíµÄ¿â£¬Ä¿Ç°°æ±¾ÎªV1.0£¬¿ÉÒÔÔÚÉÌÒµºÍÑо¿ÁìÓòÃâ·ÑʵÓá£
Ö÷ÒªÓÃÓÚ´¦Àí
ͼÏñ´¦Àí
¼ÆËã»úÊÓ¾õ
ģʽʶ±ð
ÎïÌåʶ±ð(ÈËÁ³Ê¶±ð£¬Objectʶ±ð)
Ô˶¯¸ú×Ù
3. ÔÚpythonÖÐʹÓÃOpenCV
ÔÚpythonÖÐʹÓÃOpenCV
http://www.opencv.org.cn/index.php/%E5%9C%A8python%E4%B8%AD%E4%BD%BF%E7%94%A8OpenCV
°²×°python2.5
µ½ÒÔϵØÖ·ÏÂÔØ, È»ºóĬÈÏ°²×°.
http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
°²×°OpenCV
ÏÂÔØOpenCV, °²×°ºó½«¶ÔÓ¦µÄbinĿ¼Ìí¼Óµ½PATH±äÁ¿.
http://www.opencv.org.cn/download/OpenCV_1.0.exe
ÅäÖÃOpenCVµÄpython½Ó¿Ú
´ò¿ªÄ¿Â¼ OpenCV\interfaces\swig\python, ÔËÐÐÒÔÏÂÃüÁî:
setup-for-win.py build
setup-for-win.py install
²âÊÔ
±àдÒÔÏ´úÂë:
# -*- coding:utf-8 -*-
# mycv.py

import sys

# µ¼ÈëOpenCVÄ£¿é

from opencv.cv import *
from opencv.highgui import *

if __name__ == '__main__':

# ´ò¿ªÍ¼Ïñ

image = cvLoadImage ("lena.jpg")

# ´´½¨´°¿Ú

cvNamedWindow ("mywin")

# ÏÔʾͼÏñ

cvShowImage ("mywin", image)
cvWaitKey (0)


Ïà¹ØÎĵµ£º

Python and MySQL

 ½üÀ´ÐèÒªÓÃPython¶ÔMySQLÊý¾Ý¿â½øÐвÙ×÷¡£Python¾ÃÎÅÆäÃû£¬Î´¼ûÆä“ÈË”£»Êý¾Ý¿âÔø¾­ºÜ¸ß·Ö£¬ÔçÒÑ»¹¸øÏÈÉú£¬¸üÎÞMySQL¾­Ñé¡£ÓÚÊÇÒ»ÇдÓÁ㿪ʼ£¬½è»úºÃºÃѧϰһ·¬¡£
PythonÕâ¸ö½Å±¾ÓïÑÔȷʵÃû¸±Æäʵ£¬ÓÃÁ˼¸Ìì±ãϲ»¶ÉÏËüÀ²¡£ºÜ¼ò½à£¬ºÜ·½±ã¡£ÒÔËõ¼õ×÷Ϊģ¿é·Ö¸î·û£¬¶ÁÆðÀ´ÉÍÐÄÔÃÄ¿¡£pythonµÄÄÚ½¨Êý¾ÝÀàÐÍ£¨ ......

ÔÚPythonÖж¯Ì¬°ó¶¨property

 ÔÚPythonÖпÉÒÔ°Ñproperty¶¯Ì¬µÄ°ó¶¨µÄobjectµÄ¼Ì³ÐÀàÖУ¬²¢ÇÒ¿ÉÒÔ¶¨Òå´øÓвÎÊýµÄgetºÍset·½·¨¡£
±ÈÈ磬ÎÒÃǶ¨ÒåÁËÈ«¾Ö±äÁ¿g£¬È»ºóͨ¹ýÁ½¸ö·½·¨À´´æÈ¡gµÄÄÚÈÝ
def get_g(self):
    return g
def set_g(self, _g):
    global g
    g = _g
¶¨ÒåÒ»¸öobjectµÄ¼Ì³ ......

PEP 0263 Defining Python Source Code Encodings

 
PEP 0263
Defining Python Source Code Encodings
Python will default to ASCII as standard encoding if no other
encoding hints are given.
To define a source code encoding, a magic comment must
be placed into the source files either as first or second
line in the file, suc ......

[¶À¼Ò]Google½«ÏÞÖÆPythonÓïÑÔµÄÓ¦Óà ¿ª·¢ÉçÇøÈÈÒé

2009-11-16 
Collin WinterÊÇPythonÉçÇøһλÆľßÓ°ÏìÁ¦µÄ¿ª·¢Õߣ¬ËûÔøÊÇCPythonÏîÄ¿µÄºËÐÄ¿ª·¢ÕßÖ®Ò»¡¢Ò²ÔøÊÇUnladen Swallow£¨¼ûÎÄĩעÊÍ£©µÄºËÐÄ¿ª·¢Õߣ¬²ÎÓëÁ˺ܶàPythonÏîÄ¿µÄ¿ª·¢¡£½üÀ´´«ÎÅGoogle½«ÔÚÆäÐÂÏîÄ¿ÖÐÏÞÖÆPythonµÄʹÓã¬Îª´ËÓпª·¢Õߣ¨ÒÔK±íʾ£©ÔÚGoogle ÂÛ̳Öй«¿ªÑ¯ÎÊÁËCollin Winter£¬Collin Winte ......

eat python 003

Documentation for C's fopen():
---
r Open text file for reading. The stream is positioned at the beginning
of the file.
r+ Open for reading and writing. The stream is positioned at the
beginning of the file.
w Truncate file to zero length or create text file for writing. The
stream is posi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ