<?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: OpenCV memory leaking management in C/C++</title>
	<atom:link href="http://www.andol.info/hci/963.htm/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andol.info/hci/963.htm</link>
	<description>Just value your mind</description>
	<lastBuildDate>Thu, 09 Feb 2012 10:55:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: sethu</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-2721</link>
		<dc:creator>sethu</dc:creator>
		<pubDate>Fri, 03 Jun 2011 03:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-2721</guid>
		<description>Hi Andol,
I would like to how to track the detected features using Kalman filter.
Right now, I detected some features like vehicles, headlights. I need to track them using kalman filter.</description>
		<content:encoded><![CDATA[<p>Hi Andol,<br />
I would like to how to track the detected features using Kalman filter.<br />
Right now, I detected some features like vehicles, headlights. I need to track them using kalman filter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-2375</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Thu, 10 Mar 2011 09:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-2375</guid>
		<description>The post has been updated, cheers.</description>
		<content:encoded><![CDATA[<p>The post has been updated, cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Utkarsh</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-2369</link>
		<dc:creator>Utkarsh</dc:creator>
		<pubDate>Wed, 09 Mar 2011 04:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-2369</guid>
		<description>Hi! Can you update the link to the original article on this post? I&#039;ve moved it here - http://www.aishack.in/2010/01/opencv-memory-management

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi! Can you update the link to the original article on this post? I&#8217;ve moved it here &#8211; <a href="http://www.aishack.in/2010/01/opencv-memory-management" rel="nofollow">http://www.aishack.in/2010/01/opencv-memory-management</a></p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OpenCV memory leaking management in C/C++ &#124; blogyangs</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1439</link>
		<dc:creator>OpenCV memory leaking management in C/C++ &#124; blogyangs</dc:creator>
		<pubDate>Fri, 26 Nov 2010 08:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1439</guid>
		<description>[...] From:http://www.andol.info/hci/963.htm [...]</description>
		<content:encoded><![CDATA[<p>[...] From:<a href="http://www.andol.info/hci/963.htm" rel="nofollow">http://www.andol.info/hci/963.htm</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enzo</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1339</link>
		<dc:creator>Enzo</dc:creator>
		<pubDate>Mon, 18 Oct 2010 03:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1339</guid>
		<description>Just about everyone encounters memory/recources problems when using OpenCV, it&#039;s just a result of using raw pointers.

I have created an object oriented image structure to wrap IplImage with shared_ptr.

It is very fast, easy to use and makes code infinitely easier to read.

The structure is called blImage and is part of my blImageAPI, which can be found at: http://www.barbato.us/2010/10/14/image-data-structure-based-shared_ptr-iplimage/

This makes IplImage so easy to use, you can do the following:

int main(int argc, char *argv[])
{
    // Create a blank 8-bit color image
    blImage&lt; blColor3 &gt; MyImage;
 
    // Load an image from file
    MyImage.LoadImageFromFile(&quot;C:\\tux.png&quot;);
 
    // Create a floating point grayscale
    // version of our colored image
    blImage MyImage2 = MyImage;
 
    // We can easily access pixel data very efficiently
    for(int i = 0; i &lt; MyImage2.size1(); ++i)
        for(int j = 0; j &lt; MyImage2.size2(); ++j)
            MyImage2[i][j] += 100;
 
    blImage MyImage3 = MyImage2;
 
    // Let&#039;s take the first derivative in both directions
    cvSobel(MyImage2,MyImage2,1,1);
 
    cvNamedWindow(&quot;tux&quot;,CV_WINDOW_AUTOSIZE);
    cvShowImage(&quot;tux&quot;,MyImage3);
    cvWaitKey(0);
    return 0;
}

Good luck and enjoy</description>
		<content:encoded><![CDATA[<p>Just about everyone encounters memory/recources problems when using OpenCV, it&#8217;s just a result of using raw pointers.</p>
<p>I have created an object oriented image structure to wrap IplImage with shared_ptr.</p>
<p>It is very fast, easy to use and makes code infinitely easier to read.</p>
<p>The structure is called blImage and is part of my blImageAPI, which can be found at: <a href="http://www.barbato.us/2010/10/14/image-data-structure-based-shared_ptr-iplimage/" rel="nofollow">http://www.barbato.us/2010/10/14/image-data-structure-based-shared_ptr-iplimage/</a></p>
<p>This makes IplImage so easy to use, you can do the following:</p>
<p>int main(int argc, char *argv[])<br />
{<br />
    // Create a blank 8-bit color image<br />
    blImage&lt; blColor3 &gt; MyImage;</p>
<p>    // Load an image from file<br />
    MyImage.LoadImageFromFile(&#8220;C:\\tux.png&#8221;);</p>
<p>    // Create a floating point grayscale<br />
    // version of our colored image<br />
    blImage MyImage2 = MyImage;</p>
<p>    // We can easily access pixel data very efficiently<br />
    for(int i = 0; i &lt; MyImage2.size1(); ++i)<br />
        for(int j = 0; j &lt; MyImage2.size2(); ++j)<br />
            MyImage2[i][j] += 100;</p>
<p>    blImage MyImage3 = MyImage2;</p>
<p>    // Let&#8217;s take the first derivative in both directions<br />
    cvSobel(MyImage2,MyImage2,1,1);</p>
<p>    cvNamedWindow(&#8220;tux&#8221;,CV_WINDOW_AUTOSIZE);<br />
    cvShowImage(&#8220;tux&#8221;,MyImage3);<br />
    cvWaitKey(0);<br />
    return 0;<br />
}</p>
<p>Good luck and enjoy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wordpress Themes</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1292</link>
		<dc:creator>Wordpress Themes</dc:creator>
		<pubDate>Thu, 23 Sep 2010 15:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1292</guid>
		<description>Nice post and this mail helped me alot in my college assignement. Thank you seeking your information.</description>
		<content:encoded><![CDATA[<p>Nice post and this mail helped me alot in my college assignement. Thank you seeking your information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Memory leaking in OpenCV &#171; Blue&#39;s Blog</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1104</link>
		<dc:creator>Memory leaking in OpenCV &#171; Blue&#39;s Blog</dc:creator>
		<pubDate>Sat, 19 Jun 2010 19:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1104</guid>
		<description>[...] jest, aby pamiętać o czyszczeniu pamięci. Bardzo dobrą stroną dotyczącą tego tematu jest: http://www.andol.info/hci/963.htm, a w wielkim [...]</description>
		<content:encoded><![CDATA[<p>[...] jest, aby pamiętać o czyszczeniu pamięci. Bardzo dobrą stroną dotyczącą tego tematu jest: <a href="http://www.andol.info/hci/963.htm" rel="nofollow">http://www.andol.info/hci/963.htm</a>, a w wielkim [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neithan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1090</link>
		<dc:creator>Neithan</dc:creator>
		<pubDate>Wed, 09 Jun 2010 16:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1090</guid>
		<description>The same code is not working for different versions of OpenCv (1.0 and 2.0)... so I moved to the old version again (1.0) and now I&#039;m not having problems.

Thank you all for your help</description>
		<content:encoded><![CDATA[<p>The same code is not working for different versions of OpenCv (1.0 and 2.0)&#8230; so I moved to the old version again (1.0) and now I&#8217;m not having problems.</p>
<p>Thank you all for your help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1089</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Wed, 09 Jun 2010 11:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1089</guid>
		<description>@Neithan  check new codes below, which have been running properly without memory leaking, by using &#039;cvReleaseMemStorage()&#039;. a better way of using &#039;memstorage&#039; is to define it before and outside cycles and release it after cycles. cheers
---
int main()
{
	int c = 0;
	int i = 0;
    CvCapture* capture = cvCaptureFromCAM(0);
		if(!cvQueryFrame(capture)){ cout&lt;&lt;&quot;Video capture failed, please check the camera.&quot;&lt;&lt;endl;}else{cout&lt;&lt;&quot;Video camera capture status: OK&quot;&lt;&lt;endl;};
    CvSize sz = cvGetSize(cvQueryFrame( capture));
	cout &lt;&lt; &quot;capture size: &quot; &lt;&lt; sz.width &lt;&lt;endl;
	IplImage* src = cvCreateImage( sz, 8, 3 );
	IplImage* gray = cvCreateImage(sz,8,1);
	cvCvtColor(src,gray,CV_BGR2GRAY);
	cvNamedWindow(&quot;info&quot;,1);

	CvMemStorage* myStorage = cvCreateMemStorage(0);
	CvSeq* lines = 0;


	while (c!=27)
	{
		lines = cvHoughLines2(gray,myStorage,CV_HOUGH_STANDARD,1,CV_PI/180,100,0,0);
		cout&lt;&lt; &quot;  lines total&quot; &lt;&lt; lines-&gt;total;
		for(i=0; i&lt;lines-&gt;total; i++)
		{
			float* line = (float*)cvGetSeqElem(lines,i);
			float rho = line[0];
			float theta = line[1];
			CvPoint pt1, pt2;
			double a = cos(theta), b = sin(theta);
			double x0 = a*rho, y0 = b*rho;
			pt1.x = cvRound(x0 + 1000*(-b));
			pt1.y = cvRound(y0 + 1000*(a));
			pt2.x = cvRound(x0 - 1000*(-b));
			pt2.y = cvRound(y0 - 1000*(a));
			cvLine( src, pt1, pt2, CV_RGB(255,0,0), 3, CV_AA, 0 );
		}

		src = cvQueryFrame(capture);
		cvShowImage(&quot;info&quot;,src);
		c = cvWaitKey(10);
	}
	cvReleaseImage(&amp;src);
	cvReleaseMemStorage(&amp;myStorage);
	cvReleaseCapture(&amp;capture);
	cvDestroyAllWindows();
}
---</description>
		<content:encoded><![CDATA[<p>@Neithan  check new codes below, which have been running properly without memory leaking, by using &#8216;cvReleaseMemStorage()&#8217;. a better way of using &#8216;memstorage&#8217; is to define it before and outside cycles and release it after cycles. cheers<br />
&#8212;<br />
int main()<br />
{<br />
	int c = 0;<br />
	int i = 0;<br />
    CvCapture* capture = cvCaptureFromCAM(0);<br />
		if(!cvQueryFrame(capture)){ cout< <"Video capture failed, please check the camera."<<endl;}else{cout<<"Video camera capture status: OK"<<endl;};<br />
    CvSize sz = cvGetSize(cvQueryFrame( capture));<br />
	cout << "capture size: " << sz.width <<endl;<br />
	IplImage* src = cvCreateImage( sz, 8, 3 );<br />
	IplImage* gray = cvCreateImage(sz,8,1);<br />
	cvCvtColor(src,gray,CV_BGR2GRAY);<br />
	cvNamedWindow("info",1);</p>
<p>	CvMemStorage* myStorage = cvCreateMemStorage(0);<br />
	CvSeq* lines = 0;</p>
<p>	while (c!=27)<br />
	{<br />
		lines = cvHoughLines2(gray,myStorage,CV_HOUGH_STANDARD,1,CV_PI/180,100,0,0);<br />
		cout<< "  lines total" << lines->total;<br />
		for(i=0; i
<lines ->total; i++)<br />
		{<br />
			float* line = (float*)cvGetSeqElem(lines,i);<br />
			float rho = line[0];<br />
			float theta = line[1];<br />
			CvPoint pt1, pt2;<br />
			double a = cos(theta), b = sin(theta);<br />
			double x0 = a*rho, y0 = b*rho;<br />
			pt1.x = cvRound(x0 + 1000*(-b));<br />
			pt1.y = cvRound(y0 + 1000*(a));<br />
			pt2.x = cvRound(x0 &#8211; 1000*(-b));<br />
			pt2.y = cvRound(y0 &#8211; 1000*(a));<br />
			cvLine( src, pt1, pt2, CV_RGB(255,0,0), 3, CV_AA, 0 );<br />
		}</p>
<p>		src = cvQueryFrame(capture);<br />
		cvShowImage(&#8220;info&#8221;,src);<br />
		c = cvWaitKey(10);<br />
	}<br />
	cvReleaseImage(&#038;src);<br />
	cvReleaseMemStorage(&#038;myStorage);<br />
	cvReleaseCapture(&#038;capture);<br />
	cvDestroyAllWindows();<br />
}<br />
&#8212;</lines>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neithan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1088</link>
		<dc:creator>Neithan</dc:creator>
		<pubDate>Wed, 09 Jun 2010 08:29:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1088</guid>
		<description>Memory is not being released with using storage = NULL ... the problem is that I have to create and release a storage more than 1000 times, and between the creation and the release I use the Hough Detection method that lacks the storage. 

Thank You again</description>
		<content:encoded><![CDATA[<p>Memory is not being released with using storage = NULL &#8230; the problem is that I have to create and release a storage more than 1000 times, and between the creation and the release I use the Hough Detection method that lacks the storage. </p>
<p>Thank You again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1087</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Tue, 08 Jun 2010 15:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1087</guid>
		<description>@Neithan To release the memory of &#039;storage&#039;, it is also available to define it once, and then use &#039;storage = NULL&#039; to clean it before using it.</description>
		<content:encoded><![CDATA[<p>@Neithan To release the memory of &#8216;storage&#8217;, it is also available to define it once, and then use &#8216;storage = NULL&#8217; to clean it before using it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neithan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1086</link>
		<dc:creator>Neithan</dc:creator>
		<pubDate>Tue, 08 Jun 2010 15:33:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1086</guid>
		<description>The problem of your code is that you are not releasing memory and if you want to process an array of N (N is a huge number) the memory fails ... :(

but thank you anyway</description>
		<content:encoded><![CDATA[<p>The problem of your code is that you are not releasing memory and if you want to process an array of N (N is a huge number) the memory fails &#8230; <img src='http://www.andol.info/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>but thank you anyway</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1085</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Tue, 08 Jun 2010 09:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1085</guid>
		<description>@ Neithan  check out this:
/* This is a standalone program. Pass an image name as a first parameter of the program.
   Switch between standard and probabilistic Hough transform by changing &quot;#if 1&quot; to &quot;#if 0&quot; and back */
#include &lt;cv.h&gt;
#include &lt;highgui.h&gt;
#include &lt;math.h&gt;
 
int main(int argc, char** argv)
{
    const char* filename = argc &gt;= 2 ? argv[1] : &quot;pic1.png&quot;;
    IplImage* src = cvLoadImage( filename, 0 );
    IplImage* dst;
    IplImage* color_dst;
    CvMemStorage* storage = cvCreateMemStorage(0);
    CvSeq* lines = 0;
    int i;
 
    if( !src )
        return -1;
 
    dst = cvCreateImage( cvGetSize(src), 8, 1 );
    color_dst = cvCreateImage( cvGetSize(src), 8, 3 );
 
    cvCanny( src, dst, 50, 200, 3 );
    cvCvtColor( dst, color_dst, CV_GRAY2BGR );
#if 0
    lines = cvHoughLines2( dst, storage, CV_HOUGH_STANDARD, 1, CV_PI/180, 100, 0, 0 );
 
    for( i = 0; i &lt; MIN(lines-&gt;total,100); i++ )
    {
        float* line = (float*)cvGetSeqElem(lines,i);
        float rho = line[0];
        float theta = line[1];
        CvPoint pt1, pt2;
        double a = cos(theta), b = sin(theta);
        double x0 = a*rho, y0 = b*rho;
        pt1.x = cvRound(x0 + 1000*(-b));
        pt1.y = cvRound(y0 + 1000*(a));
        pt2.x = cvRound(x0 - 1000*(-b));
        pt2.y = cvRound(y0 - 1000*(a));
        cvLine( color_dst, pt1, pt2, CV_RGB(255,0,0), 3, CV_AA, 0 );
    }
#else
    lines = cvHoughLines2( dst, storage, CV_HOUGH_PROBABILISTIC, 1, CV_PI/180, 50, 50, 10 );
    for( i = 0; i &lt; lines-&gt;total; i++ )
    {
        CvPoint* line = (CvPoint*)cvGetSeqElem(lines,i);
        cvLine( color_dst, line[0], line[1], CV_RGB(255,0,0), 3, CV_AA, 0 );
    }
#endif
    cvNamedWindow( &quot;Source&quot;, 1 );
    cvShowImage( &quot;Source&quot;, src );
 
    cvNamedWindow( &quot;Hough&quot;, 1 );
    cvShowImage( &quot;Hough&quot;, color_dst );
 
    cvWaitKey(0);
 
    return 0;
}</description>
		<content:encoded><![CDATA[<p>@ Neithan  check out this:<br />
/* This is a standalone program. Pass an image name as a first parameter of the program.<br />
   Switch between standard and probabilistic Hough transform by changing &#8220;#if 1&#8243; to &#8220;#if 0&#8243; and back */<br />
#include <cv .h><br />
#include <highgui .h><br />
#include<br />
<math .h>
<p>int main(int argc, char** argv)<br />
{<br />
    const char* filename = argc >= 2 ? argv[1] : &#8220;pic1.png&#8221;;<br />
    IplImage* src = cvLoadImage( filename, 0 );<br />
    IplImage* dst;<br />
    IplImage* color_dst;<br />
    CvMemStorage* storage = cvCreateMemStorage(0);<br />
    CvSeq* lines = 0;<br />
    int i;</p>
<p>    if( !src )<br />
        return -1;</p>
<p>    dst = cvCreateImage( cvGetSize(src), 8, 1 );<br />
    color_dst = cvCreateImage( cvGetSize(src), 8, 3 );</p>
<p>    cvCanny( src, dst, 50, 200, 3 );<br />
    cvCvtColor( dst, color_dst, CV_GRAY2BGR );<br />
#if 0<br />
    lines = cvHoughLines2( dst, storage, CV_HOUGH_STANDARD, 1, CV_PI/180, 100, 0, 0 );</p>
<p>    for( i = 0; i < MIN(lines->total,100); i++ )<br />
    {<br />
        float* line = (float*)cvGetSeqElem(lines,i);<br />
        float rho = line[0];<br />
        float theta = line[1];<br />
        CvPoint pt1, pt2;<br />
        double a = cos(theta), b = sin(theta);<br />
        double x0 = a*rho, y0 = b*rho;<br />
        pt1.x = cvRound(x0 + 1000*(-b));<br />
        pt1.y = cvRound(y0 + 1000*(a));<br />
        pt2.x = cvRound(x0 &#8211; 1000*(-b));<br />
        pt2.y = cvRound(y0 &#8211; 1000*(a));<br />
        cvLine( color_dst, pt1, pt2, CV_RGB(255,0,0), 3, CV_AA, 0 );<br />
    }<br />
#else<br />
    lines = cvHoughLines2( dst, storage, CV_HOUGH_PROBABILISTIC, 1, CV_PI/180, 50, 50, 10 );<br />
    for( i = 0; i < lines->total; i++ )<br />
    {<br />
        CvPoint* line = (CvPoint*)cvGetSeqElem(lines,i);<br />
        cvLine( color_dst, line[0], line[1], CV_RGB(255,0,0), 3, CV_AA, 0 );<br />
    }<br />
#endif<br />
    cvNamedWindow( &#8220;Source&#8221;, 1 );<br />
    cvShowImage( &#8220;Source&#8221;, src );</p>
<p>    cvNamedWindow( &#8220;Hough&#8221;, 1 );<br />
    cvShowImage( &#8220;Hough&#8221;, color_dst );</p>
<p>    cvWaitKey(0);</p>
<p>    return 0;<br />
}</math>
<p></highgui></cv></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neithan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1084</link>
		<dc:creator>Neithan</dc:creator>
		<pubDate>Tue, 08 Jun 2010 09:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1084</guid>
		<description>I&#039;m having problems using a Visual Studio Solution over Windows Vista for a Hough Line detection

This is may code:

IplImage* src = cvLoadImage(&quot;C:\\Draw.jpg&quot;,0);
CvMemStorage* storage = cvCreateMemStorage( 0);
	
CvSeq* lines = 0;
lines = cvHoughLines2( src, storage, CV_HOUGH_PROBABILISTIC, 1,CV_PI/180, 20, 30, 5);

for(int i = 0; i total; i++ )
			{
				CvPoint* line = (CvPoint*)cvGetSeqElem(lines,i);
// Here I use the point information
                      }

cvReleaseImage( &amp;src);
cvReleaseMemStorage( &amp;storage); // Here is the bug</description>
		<content:encoded><![CDATA[<p>I&#8217;m having problems using a Visual Studio Solution over Windows Vista for a Hough Line detection</p>
<p>This is may code:</p>
<p>IplImage* src = cvLoadImage(&#8220;C:\\Draw.jpg&#8221;,0);<br />
CvMemStorage* storage = cvCreateMemStorage( 0);</p>
<p>CvSeq* lines = 0;<br />
lines = cvHoughLines2( src, storage, CV_HOUGH_PROBABILISTIC, 1,CV_PI/180, 20, 30, 5);</p>
<p>for(int i = 0; i total; i++ )<br />
			{<br />
				CvPoint* line = (CvPoint*)cvGetSeqElem(lines,i);<br />
// Here I use the point information<br />
                      }</p>
<p>cvReleaseImage( &amp;src);<br />
cvReleaseMemStorage( &amp;storage); // Here is the bug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1028</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Fri, 16 Apr 2010 08:34:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1028</guid>
		<description>Cheers man~</description>
		<content:encoded><![CDATA[<p>Cheers man~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dnul</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-1027</link>
		<dc:creator>dnul</dc:creator>
		<pubDate>Fri, 16 Apr 2010 03:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-1027</guid>
		<description>Dude, this is great you really helped me.</description>
		<content:encoded><![CDATA[<p>Dude, this is great you really helped me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-953</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Fri, 19 Mar 2010 19:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-953</guid>
		<description>good job, congs</description>
		<content:encoded><![CDATA[<p>good job, congs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-952</link>
		<dc:creator>Mohan</dc:creator>
		<pubDate>Fri, 19 Mar 2010 17:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-952</guid>
		<description>hi Andol,,, i got the solution,,
i installed OpenCV_1.1pre1a ,,, working properly in windows 7 64bit,,,</description>
		<content:encoded><![CDATA[<p>hi Andol,,, i got the solution,,<br />
i installed OpenCV_1.1pre1a ,,, working properly in windows 7 64bit,,,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aibo</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-950</link>
		<dc:creator>aibo</dc:creator>
		<pubDate>Fri, 19 Mar 2010 05:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-950</guid>
		<description>Black Screen Problem!!!

Hi all, im using the java wrapper for openCV under windows. I have successfully installed openCV v1.0 (i tested the newest versions and they dont work properly), i have set the variable system Path properly pointing to the &quot;bin&quot; directory of my openCV installation software, i have also pasted the openCV.dll into the bin directory, i have placed properly the &quot;hypermedia&quot; and &quot;processing&quot; folders to the appropriate locations, i have attached all the appropriate jar files needed by openCV, i have tested all these in XP and Vista..

Despite all these steps i did, all the examples provided by the openCV for the java version (face detection, BlobDetection, Aplets, etc) work properly without linking or runtime exceptions BUT I HAVE BLACK SCREEN TO ALL OF THEM!!!

What should i do more???
Even the face detection works, i see the bounding box tracking the movement of my head but i dont have image, just blank background colour.

Any suggestions? Please Help..</description>
		<content:encoded><![CDATA[<p>Black Screen Problem!!!</p>
<p>Hi all, im using the java wrapper for openCV under windows. I have successfully installed openCV v1.0 (i tested the newest versions and they dont work properly), i have set the variable system Path properly pointing to the &#8220;bin&#8221; directory of my openCV installation software, i have also pasted the openCV.dll into the bin directory, i have placed properly the &#8220;hypermedia&#8221; and &#8220;processing&#8221; folders to the appropriate locations, i have attached all the appropriate jar files needed by openCV, i have tested all these in XP and Vista..</p>
<p>Despite all these steps i did, all the examples provided by the openCV for the java version (face detection, BlobDetection, Aplets, etc) work properly without linking or runtime exceptions BUT I HAVE BLACK SCREEN TO ALL OF THEM!!!</p>
<p>What should i do more???<br />
Even the face detection works, i see the bounding box tracking the movement of my head but i dont have image, just blank background colour.</p>
<p>Any suggestions? Please Help..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-932</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Wed, 17 Mar 2010 08:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-932</guid>
		<description>Trying some examples in openCV&#039;s esample folder, if the black screen continues, then probably the problem is in operation system,system sdk,display drivers or openCV installation.</description>
		<content:encoded><![CDATA[<p>Trying some examples in openCV&#8217;s esample folder, if the black screen continues, then probably the problem is in operation system,system sdk,display drivers or openCV installation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-931</link>
		<dc:creator>mohan</dc:creator>
		<pubDate>Wed, 17 Mar 2010 08:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-931</guid>
		<description>hi..
     i saw that the system variables are correct already but i got the black screen again.. please help me in this..
Thanks for your reply.</description>
		<content:encoded><![CDATA[<p>hi..<br />
     i saw that the system variables are correct already but i got the black screen again.. please help me in this..<br />
Thanks for your reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-926</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Tue, 16 Mar 2010 19:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-926</guid>
		<description>well Mohan, i have to say that probably you should check the system variables first, to make sure settings are all right, obviously the program is ok.</description>
		<content:encoded><![CDATA[<p>well Mohan, i have to say that probably you should check the system variables first, to make sure settings are all right, obviously the program is ok.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohan</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-925</link>
		<dc:creator>mohan</dc:creator>
		<pubDate>Tue, 16 Mar 2010 18:37:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-925</guid>
		<description>hi , 
#include 
#include &quot;cv.h&quot;
#include &quot;highgui.h&quot;
int main( int argc, char **argv )
{    CvCapture *capture = 0;
    IplImage  *frame = 0;
    int       key = 0;
    capture = cvCaptureFromCAM( 0 );
	//capture=cvCaptureFromCAM(-1);
	//capture=cvCreateCameraCapture(0);
    if ( !capture ) 
{  fprintf( stderr, &quot;Cannot open initialize webcam!\n&quot; );
        return 1;
    }
 cvNamedWindow( &quot;result&quot;, CV_WINDOW_AUTOSIZE );
    while( key != &#039;q&#039; )
	{
        frame = cvQueryFrame( capture );
       if( !frame ) break;
        cvShowImage( &quot;result&quot;, frame );
        key = cvWaitKey( 1 );
    }
    cvDestroyWindow( &quot;result&quot; );
    cvReleaseCapture( &amp;capture );

    return 0;
}

while i run the above program i got the black screen in window in my laptop(windows 7),
but i run the same program in windows vista the video can be display,,,
why the video did not display in windows7,,,

plz help me,,, i am waiting for your reply,,,</description>
		<content:encoded><![CDATA[<p>hi ,<br />
#include<br />
#include &#8220;cv.h&#8221;<br />
#include &#8220;highgui.h&#8221;<br />
int main( int argc, char **argv )<br />
{    CvCapture *capture = 0;<br />
    IplImage  *frame = 0;<br />
    int       key = 0;<br />
    capture = cvCaptureFromCAM( 0 );<br />
	//capture=cvCaptureFromCAM(-1);<br />
	//capture=cvCreateCameraCapture(0);<br />
    if ( !capture )<br />
{  fprintf( stderr, &#8220;Cannot open initialize webcam!\n&#8221; );<br />
        return 1;<br />
    }<br />
 cvNamedWindow( &#8220;result&#8221;, CV_WINDOW_AUTOSIZE );<br />
    while( key != &#8216;q&#8217; )<br />
	{<br />
        frame = cvQueryFrame( capture );<br />
       if( !frame ) break;<br />
        cvShowImage( &#8220;result&#8221;, frame );<br />
        key = cvWaitKey( 1 );<br />
    }<br />
    cvDestroyWindow( &#8220;result&#8221; );<br />
    cvReleaseCapture( &amp;capture );</p>
<p>    return 0;<br />
}</p>
<p>while i run the above program i got the black screen in window in my laptop(windows 7),<br />
but i run the same program in windows vista the video can be display,,,<br />
why the video did not display in windows7,,,</p>
<p>plz help me,,, i am waiting for your reply,,,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Risal Nasar</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-920</link>
		<dc:creator>Risal Nasar</dc:creator>
		<pubDate>Mon, 15 Mar 2010 16:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-920</guid>
		<description>cvReleaseImage(&amp;frame1) resulted in error since frame1 was referring to a part of the video capture named &quot;capture&quot;.
------------------------------------
The right example should be:
------------------------------------ 
 IplImage *tpl1 = NULL;
 IplImage *tpl2 = NULL;

tpl1 = cvCreateImage( cvSize( tpl_width, tpl_height ),frame-&gt;depth, frame-&gt;nChannels );

tpl2 = cvCreateImage( cvSize( tpl_width, tpl_height ),frame-&gt;depth, frame-&gt;nChannels );

tpl1 = tpl2; // Memory leak
----------------
Before changing the pointer tpl1 to be equal to pointer tpl2, do this :
----------------
if(tpl1 != NULL){
cvReleaseImage(&amp;tpl1);
}
tpl1 = tpl2; // No memory leak</description>
		<content:encoded><![CDATA[<p>cvReleaseImage(&amp;frame1) resulted in error since frame1 was referring to a part of the video capture named &#8220;capture&#8221;.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
The right example should be:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
 IplImage *tpl1 = NULL;<br />
 IplImage *tpl2 = NULL;</p>
<p>tpl1 = cvCreateImage( cvSize( tpl_width, tpl_height ),frame-&gt;depth, frame-&gt;nChannels );</p>
<p>tpl2 = cvCreateImage( cvSize( tpl_width, tpl_height ),frame-&gt;depth, frame-&gt;nChannels );</p>
<p>tpl1 = tpl2; // Memory leak<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Before changing the pointer tpl1 to be equal to pointer tpl2, do this :<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
if(tpl1 != NULL){<br />
cvReleaseImage(&amp;tpl1);<br />
}<br />
tpl1 = tpl2; // No memory leak</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-844</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Thu, 14 Jan 2010 09:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-844</guid>
		<description>and, cvReleaseImage() is not necessary here.</description>
		<content:encoded><![CDATA[<p>and, cvReleaseImage() is not necessary here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-843</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Thu, 14 Jan 2010 09:42:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-843</guid>
		<description>———
IplImage *frame1, *frame2;
frame1 = cvQueryFrame(capture);
frame2 = cvQueryFrame(capture);
//-----------------------
frame1 = NULL;
//-----------------------
frame1 = frame2; // Memory leak
———–</description>
		<content:encoded><![CDATA[<p>———<br />
IplImage *frame1, *frame2;<br />
frame1 = cvQueryFrame(capture);<br />
frame2 = cvQueryFrame(capture);<br />
//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
frame1 = NULL;<br />
//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
frame1 = frame2; // Memory leak<br />
———–</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Risal Nasar</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-842</link>
		<dc:creator>Risal Nasar</dc:creator>
		<pubDate>Thu, 14 Jan 2010 04:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-842</guid>
		<description>The above method does&#039;nt seems to work, Andol.  It says frame cannot be released untill capture is released.  How do I tackle this problem.</description>
		<content:encoded><![CDATA[<p>The above method does&#8217;nt seems to work, Andol.  It says frame cannot be released untill capture is released.  How do I tackle this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Risal Nasar</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-841</link>
		<dc:creator>Risal Nasar</dc:creator>
		<pubDate>Wed, 13 Jan 2010 17:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-841</guid>
		<description>Thanks a lot for the help... !!! 
I was facing memory leak problems.

---------
IplImage *frame1, *frame2;
frame1 = cvQueryFrame(capture);
frame2 = cvQueryFrame(capture);

frame1 = frame2;  // Memory leak
----------- 
Before changing the pointer frame1 to be equal to pointer frame2, do this :
cvReleaseImage(&amp;frame1);</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the help&#8230; !!!<br />
I was facing memory leak problems.</p>
<p>&#8212;&#8212;&#8212;<br />
IplImage *frame1, *frame2;<br />
frame1 = cvQueryFrame(capture);<br />
frame2 = cvQueryFrame(capture);</p>
<p>frame1 = frame2;  // Memory leak<br />
&#8212;&#8212;&#8212;&#8211;<br />
Before changing the pointer frame1 to be equal to pointer frame2, do this :<br />
cvReleaseImage(&amp;frame1);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: การจัดการปัญหา Memory Leak ใน OpenCV (C/C++) - Kan Ouivirach</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-776</link>
		<dc:creator>การจัดการปัญหา Memory Leak ใน OpenCV (C/C++) - Kan Ouivirach</dc:creator>
		<pubDate>Tue, 01 Dec 2009 10:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-776</guid>
		<description>[...] อ่านรายละเอียดทั้งหมดได้ที่: OpenCV memory leaking management in C/C++ [...]</description>
		<content:encoded><![CDATA[<p>[...] อ่านรายละเอียดทั้งหมดได้ที่: OpenCV memory leaking management in C/C++ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-449</link>
		<dc:creator>andol</dc:creator>
		<pubDate>Tue, 05 May 2009 07:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-449</guid>
		<description>you welcome. if i got some free time later, i would publish examples of memory leaking debugging in openCV.</description>
		<content:encoded><![CDATA[<p>you welcome. if i got some free time later, i would publish examples of memory leaking debugging in openCV.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How I Lost Thirty Pounds in Thirty Days</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-448</link>
		<dc:creator>How I Lost Thirty Pounds in Thirty Days</dc:creator>
		<pubDate>Mon, 04 May 2009 12:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-448</guid>
		<description>Hi, good post. I have been wondering about this issue,so thanks for posting. I&#039;ll certainly be subscribing to your site.</description>
		<content:encoded><![CDATA[<p>Hi, good post. I have been wondering about this issue,so thanks for posting. I&#8217;ll certainly be subscribing to your site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Utkarsh</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-398</link>
		<dc:creator>Utkarsh</dc:creator>
		<pubDate>Wed, 22 Apr 2009 16:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-398</guid>
		<description>:) about the permission, no problems with that.. you put up a link to the original article!</description>
		<content:encoded><![CDATA[<p> <img src='http://www.andol.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  about the permission, no problems with that.. you put up a link to the original article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-397</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Wed, 22 Apr 2009 15:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-397</guid>
		<description>and, sorry for my not getting your permission before cite it.</description>
		<content:encoded><![CDATA[<p>and, sorry for my not getting your permission before cite it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-396</link>
		<dc:creator>Andol</dc:creator>
		<pubDate>Wed, 22 Apr 2009 07:39:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-396</guid>
		<description>&lt;strong&gt;your post of openCV memory management is absolutely helpful, both me and all the users saw this. really appreciate.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p><strong>your post of openCV memory management is absolutely helpful, both me and all the users saw this. really appreciate.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Utkarsh</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-395</link>
		<dc:creator>Utkarsh</dc:creator>
		<pubDate>Wed, 22 Apr 2009 00:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-395</guid>
		<description>hi there! Glad I was of some help :)
Sorry wasn&#039;t able to respond for a long time... my computer isn&#039;t functioning... so haven&#039;t been able to update/access my blog for a long long time.</description>
		<content:encoded><![CDATA[<p>hi there! Glad I was of some help <img src='http://www.andol.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Sorry wasn&#8217;t able to respond for a long time&#8230; my computer isn&#8217;t functioning&#8230; so haven&#8217;t been able to update/access my blog for a long long time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rules of memory management of openCV &#124; Andol</title>
		<link>http://www.andol.info/hci/963.htm/comment-page-1#comment-393</link>
		<dc:creator>Rules of memory management of openCV &#124; Andol</dc:creator>
		<pubDate>Mon, 20 Apr 2009 09:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.andol.info/?p=963#comment-393</guid>
		<description>[...] OpenCV memory leaking management in C/C++ [...]</description>
		<content:encoded><![CDATA[<p>[...] OpenCV memory leaking management in C/C++ [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

