OpenCV --- Python 3.1 support

View: New views
5 Messages — Rating Filter:   Alert me  

OpenCV --- Python 3.1 support

by jiapei100 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi, all:

It seems current OpenCV is supporting Python 2.6. Some of the .cxx files are automatically generated during the OpenCV compilation, they are:
cvPYTHON_wrap.cxx
highguiPYTHON_wrap.cxx
mlPYTHON_wrap.cxx

These generated files seem to be only compatible with Python 2.6 ( no later than Python 3.0).
Is there anybody who met the same problem?

Best Regards
JIA


--
Welcome to Vision Open
http://www.visionopen.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel
Welcome to Vision Open
http://www.visionopen.com

Re: [OpenCV] OpenCV --- Python 3.1 support

by Mark Asbach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi again, Jia,

> It seems current OpenCV is supporting Python 2.6. Some of the .cxx  
> files are automatically generated during the OpenCV compilation,  
> they are:

[...]

> These generated files seem to be only compatible with Python 2.6  
> ( no later than Python 3.0).
> Is there anybody who met the same problem?

my two cents:

It doesn't seem to be the right time to start support for Python 3.0.  
As long as numpy is not supported with Python 3.0 no one will really  
want to do scientific stuff with Python 3.0. And as long as numpy  
hasn't been ported to 3.0 it also not clear to what extent it will  
support the (not that new but mandatory for 3.0) buffer protocol. This  
however will make it very speculative, how OpenCV should interface  
with other scientific libraries for Python >= 2.6, because at this  
time, they all rely on the numpy array interface.

See:
http://docs.scipy.org/doc/numpy/reference/arrays.interface.html
http://docs.python.org/dev/c-api/buffer.html
http://jarrodmillman.blogspot.com/2009/01/when-will-numpy-and-scipy-migrate-to.html

It will be not far in the future that numpy will support the new  
buffer interface and Python 3.0. That will be the best time to think  
about OpenCV on Python 3.0 - at least in my opinion.

Best,
Mark

--
Mark Asbach
Institut für Nachrichtentechnik, RWTH Aachen University
http://www.ient.rwth-aachen.de/cms/team/m_asbach



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel

smime.p7s (5K) Download Attachment

Re: [OpenCV] OpenCV --- Python 3.1 support

by Guy K. Kloss-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 13 Aug 2009 21:30:28 Mark Asbach wrote:
> It will be not far in the future that numpy will support the new  
> buffer interface and Python 3.0. That will be the best time to think  
> about OpenCV on Python 3.0 - at least in my opinion.

+1

This also seems to go hand-in-hand with other packages doing numerical
computations and that are tied tightly to NumPy and SciPy. And I've had the
feeling that the ctypes and Cython based bindings for OpenCV are also not
really on the Py3k bandwagon, yet, exactly because of these issues.

Guy

--
Guy K. Kloss
Institute of Information and Mathematical Sciences
Te Kura Pūtaiao o Mōhiohio me Pāngarau
Massey University, Albany (North Shore City, Auckland)
473 State Highway 17, Gate 1, Mailroom, Quad B Building
voice: +64 9 414-0800 ext. 9585   fax: +64 9 441-8181
G.Kloss@... http://www.massey.ac.nz/~gkloss

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel

Re: OpenCV --- Python 3.1 support

by Roman Stanchak-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FWIW, these autogenerated files are created by SWIG, which reportedly
introduced support for Python 3 in version 1.3.37 - so it may only be
a matter of regenerating the files with an up to date version of SWIG.
 Some of the custom wrapper code may break, but if Python 3 support is
important to you, it may be worthwhile to give it a try.

Roman

On Thu, Aug 13, 2009 at 5:15 AM, JIA Pei<jp4work@...> wrote:

>
> Hi, all:
>
> It seems current OpenCV is supporting Python 2.6. Some of the .cxx files are
> automatically generated during the OpenCV compilation, they are:
> cvPYTHON_wrap.cxx
> highguiPYTHON_wrap.cxx
> mlPYTHON_wrap.cxx
>
> These generated files seem to be only compatible with Python 2.6 ( no later
> than Python 3.0).
> Is there anybody who met the same problem?
>
> Best Regards
> JIA
>
>
> --
> Welcome to Vision Open
> http://www.visionopen.com
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Opencvlibrary-devel mailing list
> Opencvlibrary-devel@...
> https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel

Re: [OpenCV] OpenCV --- Python 3.1 support

by David Bolen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Guy K. Kloss" <g.kloss@...> writes:

> On Thu, 13 Aug 2009 21:30:28 Mark Asbach wrote:
>> It will be not far in the future that numpy will support the new  
>> buffer interface and Python 3.0. That will be the best time to think  
>> about OpenCV on Python 3.0 - at least in my opinion.
>
> +1
>
> This also seems to go hand-in-hand with other packages doing numerical
> computations and that are tied tightly to NumPy and SciPy. And I've had the
> feeling that the ctypes and Cython based bindings for OpenCV are also not
> really on the Py3k bandwagon, yet, exactly because of these issues.
>

For what it's worth, the ctypes-opencv wrapper should be compatible
with Python 3, at least it was with 3.0.1 when I last tested, and
based on its recent update history it looks like Python 3 related
fixes are still being made/tested.

I ran a few quick tests with a current version of the wrapper against
Python 3.1 on Windows (didn't download 3.1.1 yet) and it still seems
fine.

-- David


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel