<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Python OpenCV wrapper using ctypes</title>
	<atom:link href="http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/feed/" rel="self" type="application/rss+xml" />
	<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/</link>
	<description>Geeks making the world a bit better</description>
	<lastBuildDate>Mon, 09 Nov 2009 16:06:53 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: justme</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-48430</link>
		<dc:creator>justme</dc:creator>
		<pubDate>Thu, 13 Aug 2009 16:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-48430</guid>
		<description>Please ignore my recent posts AGAIN. :) I&#039;ve figured it out. I think ‘cvConvertPointsHomogenious’ should be ‘cvConvertPointsHomogeneous’. Thanks for this tool! :)</description>
		<content:encoded><![CDATA[<p>Please ignore my recent posts AGAIN. <img src='http://wwwx.cs.unc.edu/~gb/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ve figured it out. I think ‘cvConvertPointsHomogenious’ should be ‘cvConvertPointsHomogeneous’. Thanks for this tool! <img src='http://wwwx.cs.unc.edu/~gb/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justme</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-48429</link>
		<dc:creator>justme</dc:creator>
		<pubDate>Thu, 13 Aug 2009 16:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-48429</guid>
		<description>Please ignore my previous post. :) I&#039;ve worked it out but I am getting this error when I am trying to import the modules.

&gt;&gt;&gt; from CVtypes import cv
Traceback (most recent call last):
  File &quot;&quot;, line 1, in 
    from CVtypes import cv
  File &quot;E:\Charles\DownThemAll\CVtypes sf   (23-53)\CVtypes.py&quot;, line 4169, in 
    (&#039;dst&#039;, POINTER(CvMat), 1), # CvMat* dst
  File &quot;E:\Charles\DownThemAll\CVtypes sf   (23-53)\CVtypes.py&quot;, line 377, in cfunc
    return CFUNCTYPE(result, *atypes)((name, dll), tuple(aflags))
AttributeError: function &#039;cvConvertPointsHomogenious&#039; not found</description>
		<content:encoded><![CDATA[<p>Please ignore my previous post. <img src='http://wwwx.cs.unc.edu/~gb/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ve worked it out but I am getting this error when I am trying to import the modules.</p>
<p>&gt;&gt;&gt; from CVtypes import cv<br />
Traceback (most recent call last):<br />
  File &#8220;&#8221;, line 1, in<br />
    from CVtypes import cv<br />
  File &#8220;E:\Charles\DownThemAll\CVtypes sf   (23-53)\CVtypes.py&#8221;, line 4169, in<br />
    (&#8217;dst&#8217;, POINTER(CvMat), 1), # CvMat* dst<br />
  File &#8220;E:\Charles\DownThemAll\CVtypes sf   (23-53)\CVtypes.py&#8221;, line 377, in cfunc<br />
    return CFUNCTYPE(result, *atypes)((name, dll), tuple(aflags))<br />
AttributeError: function &#8216;cvConvertPointsHomogenious&#8217; not found</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justme</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-48428</link>
		<dc:creator>justme</dc:creator>
		<pubDate>Thu, 13 Aug 2009 16:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-48428</guid>
		<description>Hi!

Can you explain to me what this step means:

&quot;You’ll, of course, need to download OpenCV and get the dll’s on your path.&quot;

Moreover, can you give a detailed instruction on how I am supposed to make this work. I installed OpenCV in windows, I have the path to the dll, I&#039;ve downloaded your CVtypes.py but I can&#039;t make it work. :(

Please be gentle. Python newbie here. :)

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>Can you explain to me what this step means:</p>
<p>&#8220;You’ll, of course, need to download OpenCV and get the dll’s on your path.&#8221;</p>
<p>Moreover, can you give a detailed instruction on how I am supposed to make this work. I installed OpenCV in windows, I have the path to the dll, I&#8217;ve downloaded your CVtypes.py but I can&#8217;t make it work. <img src='http://wwwx.cs.unc.edu/~gb/wp/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Please be gentle. Python newbie here. <img src='http://wwwx.cs.unc.edu/~gb/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dumbshow</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-44814</link>
		<dc:creator>dumbshow</dc:creator>
		<pubDate>Mon, 11 May 2009 17:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-44814</guid>
		<description>Please disregard that question.  I worked it out.</description>
		<content:encoded><![CDATA[<p>Please disregard that question.  I worked it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dumbshow</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-44728</link>
		<dc:creator>dumbshow</dc:creator>
		<pubDate>Sat, 09 May 2009 21:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-44728</guid>
		<description>what a fascinating module!

has anyone worked with the cvCreateStructuringElementEx function?  its sixth argument, the &quot;mask,&quot; is supposed to be a &quot;pointer to the structuring element data, a plane array, representing row-by-row scanning of the element matrix.&quot;

But OpenCV (and cvtypes) expect a pointer to an int...how can that capture that a multidimensional list of integers?  I tried passing byref this kind of array but no luck.

mask = (c_int * 3 * 3)((0, 0, 0), (0, 0, 0), (0, 0, 0))

Any help is greatly appreciated.</description>
		<content:encoded><![CDATA[<p>what a fascinating module!</p>
<p>has anyone worked with the cvCreateStructuringElementEx function?  its sixth argument, the &#8220;mask,&#8221; is supposed to be a &#8220;pointer to the structuring element data, a plane array, representing row-by-row scanning of the element matrix.&#8221;</p>
<p>But OpenCV (and cvtypes) expect a pointer to an int&#8230;how can that capture that a multidimensional list of integers?  I tried passing byref this kind of array but no luck.</p>
<p>mask = (c_int * 3 * 3)((0, 0, 0), (0, 0, 0), (0, 0, 0))</p>
<p>Any help is greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-44631</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Thu, 07 May 2009 16:52:14 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-44631</guid>
		<description>Hi,
I&#039;m having trouble getting a successful return value for cv.HoughCircles. Here is my code, img is an passed from cv.QueryFrame(capture):


def find_circles(img):
    gray = cv.CreateImage(cv.GetSize(img), 8, 1)
    storage = cv.CreateMemStorage(0)
    cv.CvtColor(img, gray, cv.BGR2GRAY)
    cv.Smooth(gray, gray, cv.GAUSSIAN, 9, 9)
    circles = cv.HoughCircles(gray, storage, cv.HOUGH_GRADIENT, 2, int(gray[&#039;height&#039;])/4, 200, 100)

---
Traceback (most recent call last):
  File &quot;/home/liveuser/Desktop/bot/CVtypes/vision.py&quot;, line 63, in 
    find_circles(src)
  File &quot;/home/liveuser/Desktop/bot/CVtypes/vision.py&quot;, line 37, in find_circles
    circles = cv.HoughCircles(gray, storage, cv.HOUGH_GRADIENT, 2, gray[&#039;height&#039;]/4, 200, 100)
TypeError: sequence index must be integer, not &#039;str&#039;
---

I think it has something to do with when it is trying to store results to a list, but I&#039;m not sure where to start in solving the problem.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;m having trouble getting a successful return value for cv.HoughCircles. Here is my code, img is an passed from cv.QueryFrame(capture):</p>
<p>def find_circles(img):<br />
    gray = cv.CreateImage(cv.GetSize(img), 8, 1)<br />
    storage = cv.CreateMemStorage(0)<br />
    cv.CvtColor(img, gray, cv.BGR2GRAY)<br />
    cv.Smooth(gray, gray, cv.GAUSSIAN, 9, 9)<br />
    circles = cv.HoughCircles(gray, storage, cv.HOUGH_GRADIENT, 2, int(gray['height'])/4, 200, 100)</p>
<p>&#8212;<br />
Traceback (most recent call last):<br />
  File &#8220;/home/liveuser/Desktop/bot/CVtypes/vision.py&#8221;, line 63, in<br />
    find_circles(src)<br />
  File &#8220;/home/liveuser/Desktop/bot/CVtypes/vision.py&#8221;, line 37, in find_circles<br />
    circles = cv.HoughCircles(gray, storage, cv.HOUGH_GRADIENT, 2, gray['height']/4, 200, 100)<br />
TypeError: sequence index must be integer, not &#8217;str&#8217;<br />
&#8212;</p>
<p>I think it has something to do with when it is trying to store results to a list, but I&#8217;m not sure where to start in solving the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-44465</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Mon, 04 May 2009 05:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-44465</guid>
		<description>Thank it&#039;s great...
I have a question.
How can I use cvFindStereoCorrespondence in Python?
Thank you very much</description>
		<content:encoded><![CDATA[<p>Thank it&#8217;s great&#8230;<br />
I have a question.<br />
How can I use cvFindStereoCorrespondence in Python?<br />
Thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ric Deez</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-42390</link>
		<dc:creator>Ric Deez</dc:creator>
		<pubDate>Thu, 05 Mar 2009 03:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-42390</guid>
		<description>Hi there,

I got this working on mac os x Leopard...  However, I had to explicitly include the paths to the dylib files as per below:

if os.name == &#039;posix&#039;:
    #_cxDLL = cdll.LoadLibrary(&#039;libcxcore.dylib&#039;)
    _cxDLL = cdll.LoadLibrary(&#039;/opt/local/lib/libcxcore.1.dylib&#039;)
    _cvDLL = cdll.LoadLibrary(&#039;/opt/local/lib/libcv.1.dylib&#039;)
    _hgDLL = cdll.LoadLibrary(&#039;/opt/local/lib/libhighgui.dylib&#039;)

This works but what do I need to do so that the full path names can be omitted?

Thanks in advance, 

Ric</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I got this working on mac os x Leopard&#8230;  However, I had to explicitly include the paths to the dylib files as per below:</p>
<p>if os.name == &#8216;posix&#8217;:<br />
    #_cxDLL = cdll.LoadLibrary(&#8217;libcxcore.dylib&#8217;)<br />
    _cxDLL = cdll.LoadLibrary(&#8217;/opt/local/lib/libcxcore.1.dylib&#8217;)<br />
    _cvDLL = cdll.LoadLibrary(&#8217;/opt/local/lib/libcv.1.dylib&#8217;)<br />
    _hgDLL = cdll.LoadLibrary(&#8217;/opt/local/lib/libhighgui.dylib&#8217;)</p>
<p>This works but what do I need to do so that the full path names can be omitted?</p>
<p>Thanks in advance, </p>
<p>Ric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Using VideoCapture and Opencv &#124; Thing Done</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-42256</link>
		<dc:creator>Using VideoCapture and Opencv &#124; Thing Done</dc:creator>
		<pubDate>Thu, 26 Feb 2009 04:19:35 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-42256</guid>
		<description>[...] has python bindings, these often leak memory. So to directly use the C libraries, Gary Bishop wrote CVtypes - a ctypes based binding for OpenCV. It supports much of the OpenCV libraries by calling the C [...]</description>
		<content:encoded><![CDATA[<p>[...] has python bindings, these often leak memory. So to directly use the C libraries, Gary Bishop wrote CVtypes &#8211; a ctypes based binding for OpenCV. It supports much of the OpenCV libraries by calling the C [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gb</title>
		<link>http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/comment-page-2/#comment-42249</link>
		<dc:creator>gb</dc:creator>
		<pubDate>Wed, 25 Feb 2009 12:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://wwwx.cs.unc.edu/~gb/wp/blog/2007/02/04/python-opencv-wrapper-using-ctypes/#comment-42249</guid>
		<description>See my post about the status of CVtypes at http://wwwx.cs.unc.edu/~gb/wp/blog/2009/02/25/cvtypes-status/</description>
		<content:encoded><![CDATA[<p>See my post about the status of CVtypes at <a href="http://wwwx.cs.unc.edu/~gb/wp/blog/2009/02/25/cvtypes-status/" rel="nofollow">http://wwwx.cs.unc.edu/~gb/wp/blog/2009/02/25/cvtypes-status/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
