<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Opencv on John Stowers</title><link>https://johnstowers.co.nz/tags/opencv/</link><description>Recent content in Opencv on John Stowers</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 27 Jul 2015 17:05:00 +0000</lastBuildDate><atom:link href="https://johnstowers.co.nz/tags/opencv/index.xml" rel="self" type="application/rss+xml"/><item><title>Installing OpenCV 3 on Ubuntu 12.04</title><link>https://johnstowers.co.nz/2015/07/27/opencv3-ubuntu1204/</link><pubDate>Mon, 27 Jul 2015 17:05:00 +0000</pubDate><guid>https://johnstowers.co.nz/2015/07/27/opencv3-ubuntu1204/</guid><description>Compiling OpenCV 3.0 on Ubuntu 12.04</description></item><item><title>Lightweight Development Prefixes</title><link>https://johnstowers.co.nz/2013/09/29/lightweight-development-prefixes/</link><pubDate>Sun, 29 Sep 2013 18:05:00 +0000</pubDate><guid>https://johnstowers.co.nz/2013/09/29/lightweight-development-prefixes/</guid><description>lightweight development prefixes on Linux</description></item><item><title>Interfacing Python + C + OpenCV via ctypes</title><link>https://johnstowers.co.nz/2011/07/15/interfacing-python-c-opencv-via-ctypes/</link><pubDate>Fri, 15 Jul 2011 12:01:48 +0000</pubDate><guid>https://johnstowers.co.nz/2011/07/15/interfacing-python-c-opencv-via-ctypes/</guid><description>&lt;p&gt;I was recently asked to help a colleague access his image processing C-library from python; quite a common task. As those of you who are familiar with Python might realise, there are a whole bag of ways that this can be accomplished;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://www.swig.org/" rel="noopener"&gt;SWIG&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://cython.org/" rel="noopener"&gt;Cython&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ctypes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://launchpad.net/pybindgen" rel="noopener"&gt;PybindGen&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this case the colleague only needed to access a single function from the library returning image data, and then hand this result onto OpenCV. One happy side effect of the new (&amp;gt; v2.1) python-opencv bindings is that they do &lt;a href="http://opencv.willowgarage.com/documentation/python/cookbook.html#pil-image-to-opencv" rel="noopener"&gt;no validation on CvImage.SetData&lt;/a&gt;
, which means you can pass an arbitrary string/pointer. Because of this I advised him I thought using something like SWIG was overkill, and he could just write a wrapper to his library using ctypes, or a thin python extension directly.&lt;/p&gt;</description></item></channel></rss>