<?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 More with cameras.</title>
	<atom:link href="http://blog.damiles.com/?feed=rss2&#038;p=67" rel="self" type="application/rss+xml" />
	<link>http://blog.damiles.com/?p=67</link>
	<description>Blender, OpenCV, OpenCV, Tutorials and more...</description>
	<lastBuildDate>Tue, 31 Aug 2010 09:45:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: lokye</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-984</link>
		<dc:creator>lokye</dc:creator>
		<pubDate>Tue, 29 Jun 2010 01:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-984</guid>
		<description>Thanks again for your help. Much appreciated</description>
		<content:encoded><![CDATA[<p>Thanks again for your help. Much appreciated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: damiles</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-983</link>
		<dc:creator>damiles</dc:creator>
		<pubDate>Mon, 28 Jun 2010 09:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-983</guid>
		<description>Ok the you want save each frames with correct name...

You only need open video  and read each frame in bucle and save it in correct file name.

This can be a c  example for get filename correctly with fixed number of characters:

#include &quot;stdio.h&quot;;

int main(){
        int totalFrames=30;
        int frameNum=0;
        int numChars=4;
        char parser[255];
        char fileName[255];
        
        //Create the file pattern with fixed number of characters
        sprintf(parser, &quot;FileName_%%.%dd.ext&quot;,numChars);
        printf(&quot;%s\n&quot;,parser);

        //Main bucle for save each frame.
        for(frameNum=0;frameNum&lt;totalFrames; frameNum++){
                sprintf(fileName, parser, frameNum);
                printf(&quot;%s\n&quot;, fileName);   
                //Now we can save the frame with name &quot;fileName&quot;
                /*
                ...
                */
        }
        return 0;
}


Regards.</description>
		<content:encoded><![CDATA[<p>Ok the you want save each frames with correct name&#8230;</p>
<p>You only need open video  and read each frame in bucle and save it in correct file name.</p>
<p>This can be a c  example for get filename correctly with fixed number of characters:</p>
<p>#include &#8220;stdio.h&#8221;;</p>
<p>int main(){<br />
        int totalFrames=30;<br />
        int frameNum=0;<br />
        int numChars=4;<br />
        char parser[255];<br />
        char fileName[255];</p>
<p>        //Create the file pattern with fixed number of characters<br />
        sprintf(parser, &#8220;FileName_%%.%dd.ext&#8221;,numChars);<br />
        printf(&#8220;%s\n&#8221;,parser);</p>
<p>        //Main bucle for save each frame.<br />
        for(frameNum=0;frameNum&lt;totalFrames; frameNum++){<br />
                sprintf(fileName, parser, frameNum);<br />
                printf(&quot;%s\n&quot;, fileName);<br />
                //Now we can save the frame with name &quot;fileName&quot;<br />
                /*<br />
                &#8230;<br />
                */<br />
        }<br />
        return 0;<br />
}</p>
<p>Regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lokye</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-982</link>
		<dc:creator>lokye</dc:creator>
		<pubDate>Mon, 28 Jun 2010 08:50:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-982</guid>
		<description>Hi.
What i&#039;m trying to do is to try and save all the frame in a single avi video and save those frames in .jpg format with the correct filenameeg &quot;depthmap0000.jpg&quot;, &quot; depthmap0001.jpg&quot; etc.

Firstly, get the number of frames the avi video is holding.

Secondly, loop over the number of frames one by one, then save these frames into the folder with the correct name accordingly to whichever frame they belong to. 

Can you like teach me cause i&#039;m new to OpenCV.
Thank you very much for your respond above. That was quick. *smile*</description>
		<content:encoded><![CDATA[<p>Hi.<br />
What i&#8217;m trying to do is to try and save all the frame in a single avi video and save those frames in .jpg format with the correct filenameeg &#8220;depthmap0000.jpg&#8221;, &#8221; depthmap0001.jpg&#8221; etc.</p>
<p>Firstly, get the number of frames the avi video is holding.</p>
<p>Secondly, loop over the number of frames one by one, then save these frames into the folder with the correct name accordingly to whichever frame they belong to. </p>
<p>Can you like teach me cause i&#8217;m new to OpenCV.<br />
Thank you very much for your respond above. That was quick. *smile*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: damiles</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-981</link>
		<dc:creator>damiles</dc:creator>
		<pubDate>Mon, 28 Jun 2010 08:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-981</guid>
		<description>There are another way to write avi with opencv, you can use videowriter class (C++): http://opencv.willowgarage.com/documentation/cpp/reading_and_writing_images_and_video.html#videowriter

Or with c: http://opencv.willowgarage.com/documentation/c/reading_and_writing_images_and_video.html#writeframe

You can see an example here:


    CvSize imgSize;
    imgSize.width = image-&gt;width;
    imgSize.height = image-&gt;height;



    double fps = cvGetCaptureProperty(
            input,
            CV_CAP_PROP_FPS
            );

    CvVideoWriter *writer = cvCreateVideoWriter(
            &quot;out.avi&quot;,
            CV_FOURCC(&#039;M&#039;, &#039;J&#039;, &#039;P&#039;, &#039;G&#039;),
            fps,
            imgSize
            );


    IplImage* colourImage;
    //Keep processing frames...
    for (;;) {

        //Get a frame from the input video.
        colourImage = cvQueryFrame(input);
        cvWriteFrame(writer, colourImage);

    }

    cvReleaseVideoWriter(&amp;writer);
    cvReleaseCapture(&amp;input);

}</description>
		<content:encoded><![CDATA[<p>There are another way to write avi with opencv, you can use videowriter class (C++): <a href="http://opencv.willowgarage.com/documentation/cpp/reading_and_writing_images_and_video.html#videowriter" rel="nofollow">http://opencv.willowgarage.com/documentation/cpp/reading_and_writing_images_and_video.html#videowriter</a></p>
<p>Or with c: <a href="http://opencv.willowgarage.com/documentation/c/reading_and_writing_images_and_video.html#writeframe" rel="nofollow">http://opencv.willowgarage.com/documentation/c/reading_and_writing_images_and_video.html#writeframe</a></p>
<p>You can see an example here:</p>
<p>    CvSize imgSize;<br />
    imgSize.width = image->width;<br />
    imgSize.height = image->height;</p>
<p>    double fps = cvGetCaptureProperty(<br />
            input,<br />
            CV_CAP_PROP_FPS<br />
            );</p>
<p>    CvVideoWriter *writer = cvCreateVideoWriter(<br />
            &#8220;out.avi&#8221;,<br />
            CV_FOURCC(&#8216;M&#8217;, &#8216;J&#8217;, &#8216;P&#8217;, &#8216;G&#8217;),<br />
            fps,<br />
            imgSize<br />
            );</p>
<p>    IplImage* colourImage;<br />
    //Keep processing frames&#8230;<br />
    for (;;) {</p>
<p>        //Get a frame from the input video.<br />
        colourImage = cvQueryFrame(input);<br />
        cvWriteFrame(writer, colourImage);</p>
<p>    }</p>
<p>    cvReleaseVideoWriter(&#038;writer);<br />
    cvReleaseCapture(&#038;input);</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lokye</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-980</link>
		<dc:creator>lokye</dc:creator>
		<pubDate>Mon, 28 Jun 2010 08:30:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-980</guid>
		<description>How do u save all the frames in a single video and save them with the correct filename like &quot;pic_0001&quot;, &quot;pic_0002&quot;??
Thanks for your help. Really appreciate it.</description>
		<content:encoded><![CDATA[<p>How do u save all the frames in a single video and save them with the correct filename like &#8220;pic_0001&#8243;, &#8220;pic_0002&#8243;??<br />
Thanks for your help. Really appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: damiles</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-973</link>
		<dc:creator>damiles</dc:creator>
		<pubDate>Tue, 22 Jun 2010 07:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-973</guid>
		<description>I don&#039;t need test with directshow because i no need it at this moment, but in future i will need use it.

Directshow is not bad, is other way to capture images. As V4l or specific camera driver or similar...</description>
		<content:encoded><![CDATA[<p>I don&#8217;t need test with directshow because i no need it at this moment, but in future i will need use it.</p>
<p>Directshow is not bad, is other way to capture images. As V4l or specific camera driver or similar&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doliharahap</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-972</link>
		<dc:creator>doliharahap</dc:creator>
		<pubDate>Tue, 22 Jun 2010 06:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-972</guid>
		<description>Why don&#039;t test with directshow??
Is it bad???

I&#039;ve tried also this problem in Linux (Ubuntu). The result is the same.

Ok then, thank you very much for your responds.</description>
		<content:encoded><![CDATA[<p>Why don&#8217;t test with directshow??<br />
Is it bad???</p>
<p>I&#8217;ve tried also this problem in Linux (Ubuntu). The result is the same.</p>
<p>Ok then, thank you very much for your responds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: damiles</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-971</link>
		<dc:creator>damiles</dc:creator>
		<pubDate>Mon, 21 Jun 2010 10:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-971</guid>
		<description>Hi, i no use win... and don&#039;t test with directshow, but yes, you can capture with any sdk and convert the frame to iplImage structure.</description>
		<content:encoded><![CDATA[<p>Hi, i no use win&#8230; and don&#8217;t test with directshow, but yes, you can capture with any sdk and convert the frame to iplImage structure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doliharahap</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-970</link>
		<dc:creator>doliharahap</dc:creator>
		<pubDate>Mon, 21 Jun 2010 10:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-970</guid>
		<description>have you tried to use directshow sdk along with opencv?

i just wonder if i can capture the video using directshow and then manipulate the video using opencv..

is it possible?</description>
		<content:encoded><![CDATA[<p>have you tried to use directshow sdk along with opencv?</p>
<p>i just wonder if i can capture the video using directshow and then manipulate the video using opencv..</p>
<p>is it possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doliharahap</title>
		<link>http://blog.damiles.com/?p=67&#038;cpage=2#comment-969</link>
		<dc:creator>doliharahap</dc:creator>
		<pubDate>Mon, 21 Jun 2010 08:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.damiles.com/?p=67#comment-969</guid>
		<description>Thanks for your quick reply,

how to check whether i get frame or not??
That i sure is i can display the video and i can manipulate the video that i get from the camera, but the problem is i only get grayscale video. If i use my webcam i get perfect video with color video.

i just searched and i get UYVY something which i don&#039;t understand.</description>
		<content:encoded><![CDATA[<p>Thanks for your quick reply,</p>
<p>how to check whether i get frame or not??<br />
That i sure is i can display the video and i can manipulate the video that i get from the camera, but the problem is i only get grayscale video. If i use my webcam i get perfect video with color video.</p>
<p>i just searched and i get UYVY something which i don&#8217;t understand.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
