<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create two images, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1082999#M62377</link>
    <description>&lt;P&gt;Create two images, currentFrame, previousFrame.&lt;/P&gt;

&lt;P&gt;When you acquire a new image, save it to currentFrame and process it. At the end of the main loop, transfer currentFrame to previousFrame.&lt;/P&gt;

&lt;P&gt;Repeat until satisfied.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2016 01:08:09 GMT</pubDate>
    <dc:creator>samontab</dc:creator>
    <dc:date>2016-04-12T01:08:09Z</dc:date>
    <item>
      <title>how to process two consecutive frame(objects dectection)</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1082998#M62376</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I want to realize the function of real-time detection of moving objects. At the moment, I only find a way that get segmented image &amp;nbsp;to dectect objects by using &amp;nbsp;3Dseg in SDK . The 3Dseg use the &amp;nbsp;depth information of image, only requiring the current frame image.But it also has some flaws&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;The commonly &amp;nbsp;method of moving objects detection is comparing the two consecutive frames (pixel gray level) to find out the moving objects. However, &amp;nbsp;I don't know how to deal with data of two consecutive frames to find differences in every pixel （so that i can find out whether it is belong to foreground image ）between the two frame.&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Can you give me a example about processing two consecutive frames?&lt;BR /&gt;
	&amp;nbsp;I couldnt appreciate more if you give me some advice.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 09:19:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1082998#M62376</guid>
      <dc:creator>wei_j_</dc:creator>
      <dc:date>2016-04-11T09:19:48Z</dc:date>
    </item>
    <item>
      <title>Create two images,</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1082999#M62377</link>
      <description>&lt;P&gt;Create two images, currentFrame, previousFrame.&lt;/P&gt;

&lt;P&gt;When you acquire a new image, save it to currentFrame and process it. At the end of the main loop, transfer currentFrame to previousFrame.&lt;/P&gt;

&lt;P&gt;Repeat until satisfied.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 01:08:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1082999#M62377</guid>
      <dc:creator>samontab</dc:creator>
      <dc:date>2016-04-12T01:08:09Z</dc:date>
    </item>
    <item>
      <title>Quote:samontab wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083000#M62378</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;samontab wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Create two images, currentFrame, previousFrame.&lt;/P&gt;

&lt;P&gt;When you acquire a new image, save it to currentFrame and process it. At the end of the main loop, transfer currentFrame to previousFrame.&lt;/P&gt;

&lt;P&gt;Repeat until satisfied.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for your answer! It seems that I misunderstand the function of some &amp;nbsp;interface.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 04:01:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083000#M62378</guid>
      <dc:creator>wei_j_</dc:creator>
      <dc:date>2016-04-12T04:01:51Z</dc:date>
    </item>
    <item>
      <title>Quote:samontab wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083001#M62379</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;samontab wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Create two images, currentFrame, previousFrame.&lt;/P&gt;

&lt;P&gt;When you acquire a new image, save it to currentFrame and process it. At the end of the main loop, transfer currentFrame to previousFrame.&lt;/P&gt;

&lt;P&gt;Repeat until satisfied.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I am a beginner to F200 and poor at coding..&lt;/P&gt;

&lt;P align="left"&gt;&lt;STRONG&gt;I have found a sample in F200 ,below are the codes&lt;/STRONG&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;STRONG&gt;what I should do is getting two consecutive image's data and &amp;nbsp;researching algorithm&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.008px; font-weight: 700; line-height: 19.512px;"&gt;(this is my focus)&lt;/SPAN&gt;&lt;STRONG style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;to deal with the data. &lt;/STRONG&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;STRONG style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;But now I have trouble &amp;nbsp;in first step.It maybe easy for you ,but the problem really troubles me for days.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;SPAN style="font-size: 13.008px; font-weight: bold; line-height: 19.512px;"&gt;Can you help me to add some codes to the sample？&lt;/SPAN&gt;&lt;/P&gt;

&lt;P align="left"&gt;PXCSenseManager *sm=PXCSenseManager.CreateInstance&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P align="left"&gt;sm-&amp;gt;Enable3DSeg();&lt;/P&gt;

&lt;P align="left"&gt;sm-&amp;gt;Init();&lt;/P&gt;

&lt;P align="left"&gt;while (sm-&amp;gt;AcquireFrame(true)&amp;gt;=PXC_STATUS_NO_ERROR) {&lt;/P&gt;

&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; PXC3DSeg *seg=sm-&amp;gt;Query3DSeg();&lt;/P&gt;

&lt;P align="left"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; PXCImage *image=seg-&amp;gt;AcquireSegmentedImage();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;PXCMImage.ImageData imageData = null;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P align="left"&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp; pxcmStatus acquireAccessStatus = image.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, out imageData);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px; line-height: 19.512px;"&gt;//&lt;/P&gt;

&lt;P style="font-size: 13.008px; line-height: 19.512px;"&gt;&lt;STRONG&gt;i want to&amp;nbsp;deal with&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;imageData with two consecutive frame.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px; line-height: 19.512px;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;I don not know where to get previousframe and deal with data with both previousframe and current frame.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px; line-height: 19.512px;"&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;image.ReleaseAccess(imageData);&lt;/P&gt;

&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; sm-&amp;gt;ReleaseFrame();&lt;/P&gt;

&lt;P align="left"&gt;}&lt;/P&gt;

&lt;P align="left"&gt;sm-&amp;gt;Release()&lt;/P&gt;

&lt;P style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 11:54:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083001#M62379</guid>
      <dc:creator>wei_j_</dc:creator>
      <dc:date>2016-04-12T11:54:22Z</dc:date>
    </item>
    <item>
      <title>Have a look at this video</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083002#M62380</link>
      <description>&lt;P&gt;Have a look at this video tutorial that describes how to acquire frames. It follows a standard main loop procedure, so you could easily implement something like this based on that:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=wIkIdjN6Oyw"&gt;https://www.youtube.com/watch?v=wIkIdjN6Oyw&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 12:28:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083002#M62380</guid>
      <dc:creator>samontab</dc:creator>
      <dc:date>2016-04-12T12:28:08Z</dc:date>
    </item>
    <item>
      <title>Quote:samontab wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083003#M62381</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;samontab wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Have a look at this video tutorial that describes how to acquire frames. It follows a standard main loop procedure, so you could easily implement something like this based on that:&lt;/P&gt;

&lt;P&gt;&lt;IFRAME allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/wIkIdjN6Oyw?feature=oembed" width="480"&gt;&lt;/IFRAME&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;sorry I can not watch this vedio.can you send it to my e-mail?&lt;/P&gt;

&lt;P&gt;my e-mail address is weijie0213@163.com &amp;nbsp;or 513519532@qq.com&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 12:33:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083003#M62381</guid>
      <dc:creator>wei_j_</dc:creator>
      <dc:date>2016-04-12T12:33:34Z</dc:date>
    </item>
    <item>
      <title>Here is some of the code of</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083004#M62382</link>
      <description>&lt;P&gt;Here is some of the code of the video that you can run. It acquires images one by one from an F200, and converts them into an OpenCV Mat, using a single thread to make it as simple as possible:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;pxcsensemanager.h&amp;gt;
#include &amp;lt;opencv2/opencv.hpp&amp;gt;

cv::Mat PXCImage2CVMat(PXCImage *pxcImage, PXCImage::PixelFormat format)
{
    PXCImage::ImageData data;
    pxcImage-&amp;gt;AcquireAccess(PXCImage::ACCESS_READ, format, &amp;amp;data);

    int width = pxcImage-&amp;gt;QueryInfo().width;
    int height = pxcImage-&amp;gt;QueryInfo().height;

    if(!format)
        format = pxcImage-&amp;gt;QueryInfo().format;

    int type;
    if(format == PXCImage::PIXEL_FORMAT_Y8)
        type = CV_8UC1;
    else if(format == PXCImage::PIXEL_FORMAT_RGB24)
        type = CV_8UC3;
    else if(format == PXCImage::PIXEL_FORMAT_DEPTH_F32)
        type = CV_32FC1;

    cv::Mat ocvImage = cv::Mat(cv::Size(width, height), type, data.planes[0]);

    pxcImage-&amp;gt;ReleaseAccess(&amp;amp;data);
    return ocvImage;
}

int main(int argc, char* argv[])
{
    //Define some parameters for the camera
    cv::Size frameSize = cv::Size(640, 480);
    float frameRate = 60;

    //Create the OpenCV windows and images
    cv::namedWindow("IR", cv::WINDOW_NORMAL);
    cv::namedWindow("Color", cv::WINDOW_NORMAL);
    cv::namedWindow("Depth", cv::WINDOW_NORMAL);
    cv::Mat frameIR = cv::Mat::zeros(frameSize, CV_8UC1);
    cv::Mat frameColor = cv::Mat::zeros(frameSize, CV_8UC3);
    cv::Mat frameDepth = cv::Mat::zeros(frameSize, CV_8UC1);


    //Initialize the RealSense Manager
    PXCSenseManager *pxcSenseManager = PXCSenseManager::CreateInstance();

    //Enable the streams to be used
    pxcSenseManager-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_IR, frameSize.width, frameSize.height, frameRate);
    pxcSenseManager-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_COLOR, frameSize.width, frameSize.height, frameRate);
    pxcSenseManager-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_DEPTH, frameSize.width, frameSize.height, frameRate);

    //Initialize the pipeline
    pxcSenseManager-&amp;gt;Init();

    bool keepRunning = true;
    while(keepRunning)
    {
        //Acquire any frame from the camera
        pxcSenseManager-&amp;gt;AcquireFrame(false);
        PXCCapture::Sample *sample = pxcSenseManager-&amp;gt;QuerySample();

        //Convert each frame into an OpenCV image
        //You need to make sure that the image is there first
        if(sample-&amp;gt;ir)
            frameIR = PXCImage2CVMat(sample-&amp;gt;ir, PXCImage::PIXEL_FORMAT_Y8);
        if(sample-&amp;gt;color)
            frameColor = PXCImage2CVMat(sample-&amp;gt;color, PXCImage::PIXEL_FORMAT_RGB24);
        if(sample-&amp;gt;depth)
            PXCImage2CVMat(sample-&amp;gt;depth, PXCImage::PIXEL_FORMAT_DEPTH_F32).convertTo(frameDepth, CV_8UC1);

        //Display the images
        cv::imshow("IR", frameIR);
        cv::imshow("Color", frameColor);
        cv::imshow("Depth", frameDepth);

        //Check for user input
        int key = cv::waitKey(1);
        if(key == 27)
            keepRunning = false;

        //Release the memory from the frames
        pxcSenseManager-&amp;gt;ReleaseFrame();
    }

    //Release the memory from the RealSense manager
    pxcSenseManager-&amp;gt;Release();

    return 0;
}
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 13:12:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083004#M62382</guid>
      <dc:creator>samontab</dc:creator>
      <dc:date>2016-04-12T13:12:51Z</dc:date>
    </item>
    <item>
      <title>Quote:samontab wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083005#M62383</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;samontab wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Here is some of the code of the video that you can run. It acquires images one by one from an F200, and converts them into an OpenCV Mat, using a single thread to make it as simple as possible:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;


&amp;nbsp;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 14:00:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/how-to-process-two-consecutive-frame-objects-dectection/m-p/1083005#M62383</guid>
      <dc:creator>wei_j_</dc:creator>
      <dc:date>2016-04-12T14:00:49Z</dc:date>
    </item>
  </channel>
</rss>

