<?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 hand contour detection is not working in java in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/hand-contour-detection-is-not-working-in-java/m-p/1005729#M32049</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;i want to detect a hand contour in java. it is showing black window.&lt;/P&gt;

&lt;P&gt;can any one help me what i am doing wrong here.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;code :&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Courier New';font-size:9.0pt;"&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt;/*******************************************************************************
&lt;/SPAN&gt;
&lt;SPAN style="color:#629755;font-style:italic;"&gt; INTEL CORPORATION PROPRIETARY INFORMATION
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; This software is supplied under the terms of a license agreement or nondisclosure
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; agreement with Intel Corporation and may not be copied or disclosed except in
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; accordance with the terms of that agreement
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; Copyright(c) 2014 Intel Corporation. All Rights Reserved.
&lt;/SPAN&gt;
&lt;SPAN style="color:#629755;font-style:italic;"&gt; *******************************************************************************/
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;intel.rssdk.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.lang.System.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.util.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;javax.swing.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.awt.event.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.awt.image.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.awt.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;public class &lt;/SPAN&gt;contour
{
    &lt;SPAN style="color:#cc7832;"&gt;static int &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cWidth  &lt;/SPAN&gt;= &lt;SPAN style="color:#6897bb;"&gt;640&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    static int &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cHeight &lt;/SPAN&gt;= &lt;SPAN style="color:#6897bb;"&gt;480&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    static int &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    static boolean &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;exit &lt;/SPAN&gt;= &lt;SPAN style="color:#cc7832;"&gt;false;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;    public static void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;main&lt;/SPAN&gt;(String s[])
    {

        PXCMSenseManager senseMgr = PXCMSenseManager.&lt;SPAN style="font-style:italic;"&gt;CreateInstance&lt;/SPAN&gt;()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;pxcmStatus sts &lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;sts = senseMgr.EnableStream(PXCMCapture.StreamType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;STREAM_TYPE_DEPTH&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cHeight&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)&amp;lt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
            System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.print(&lt;SPAN style="color:#6a8759;"&gt;"Failed to create Stream Instance&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#6a8759;"&gt;"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;1&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}

        sts = senseMgr.EnableHand(&lt;SPAN style="color:#cc7832;"&gt;null&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)&amp;lt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
            System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.print(&lt;SPAN style="color:#6a8759;"&gt;"Failed to enable HandAnalysis&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#6a8759;"&gt;"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;3&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}

        sts = senseMgr.Init()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(sts)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;PXCMCapture.Device device = senseMgr.QueryCaptureManager().QueryDevice()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;PXCMCapture.Device.StreamProfileSet profiles = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMCapture.Device.StreamProfileSet()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;device.QueryStreamProfileSet(profiles)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;device.SetMirrorMode(PXCMCapture.Device.MirrorMode.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;MIRROR_MODE_HORIZONTAL&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth &lt;/SPAN&gt;= profiles.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;imageInfo&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;width&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight &lt;/SPAN&gt;= profiles.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;imageInfo&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;height&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;Listener listener = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;Listener()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;contour d_raw = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;contour()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;DrawFrame d_df=&lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;DrawFrame(&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;JFrame dframe= &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;JFrame(&lt;SPAN style="color:#6a8759;"&gt;"Intel(R) RealSense(TM) SDK - Depth Stream"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.addWindowListener(listener)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.setSize(&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.add(d_df)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.setVisible(&lt;SPAN style="color:#cc7832;"&gt;true&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;//hand
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)&amp;gt;=&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
            PXCMHandModule handModule = senseMgr.QueryHand()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;PXCMHandConfiguration handConfig = handModule.CreateActiveConfiguration()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAllGestures()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAllAlerts()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAlert(PXCMHandData.AlertType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ALERT_HAND_DETECTED&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAlert(PXCMHandData.AlertType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ALERT_HAND_NOT_DETECTED&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.ApplyChanges()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.Update()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;PXCMHandData handData = handModule.CreateOutput()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;            while &lt;/SPAN&gt;(listener.&lt;SPAN style="color:#9876aa;"&gt;exit &lt;/SPAN&gt;== &lt;SPAN style="color:#cc7832;"&gt;false&lt;/SPAN&gt;)
            {
                sts = senseMgr.AcquireFrame(&lt;SPAN style="color:#cc7832;"&gt;true&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;                if &lt;/SPAN&gt;(sts == pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)
                {
                    PXCMCapture.Sample sample = senseMgr.QueryHandSample()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;//PXCMCapture.Sample handSample = senseMgr.QueryHandSample();
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;numOfHands = handData.QueryNumberOfHands()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                    &lt;/SPAN&gt;PXCMPointI32[][] pointOuter = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMPointI32[numOfHands][]&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                    if &lt;/SPAN&gt;(sample.&lt;SPAN style="color:#9876aa;"&gt;depth &lt;/SPAN&gt;!= &lt;SPAN style="color:#cc7832;"&gt;null&lt;/SPAN&gt;)
                    {
                        PXCMImage image = sample.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                        &lt;/SPAN&gt;PXCMImage.ImageData dData = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMImage.ImageData()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                        for &lt;/SPAN&gt;(&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;j = &lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;; &lt;/SPAN&gt;j &amp;lt; numOfHands&lt;SPAN style="color:#cc7832;"&gt;; &lt;/SPAN&gt;j++) {
                            &lt;SPAN style="color:#cc7832;"&gt;int&lt;/SPAN&gt;[] id = &lt;SPAN style="color:#cc7832;"&gt;new int&lt;/SPAN&gt;[&lt;SPAN style="color:#6897bb;"&gt;1&lt;/SPAN&gt;]&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;PXCMImage.ImageData data&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;handData.QueryHandId(PXCMHandData.AccessOrderType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ACCESS_ORDER_BY_TIME&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;j&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;id)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;PXCMHandData.IHand hData = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMHandData.IHand()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;handData.QueryHandData(PXCMHandData.AccessOrderType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ACCESS_ORDER_BY_TIME&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;j&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;hData)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            if &lt;/SPAN&gt;(handData != &lt;SPAN style="color:#cc7832;"&gt;null&lt;/SPAN&gt;) {
                                &lt;SPAN style="color:#cc7832;"&gt;if &lt;/SPAN&gt;(sts == hData.QuerySegmentationImage(image)) {
                                    sample.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.AcquireAccess(PXCMImage.Access.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ACCESS_READ&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;PXCMImage.PixelFormat.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PIXEL_FORMAT_RGB32&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dData)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                    if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;) &amp;lt; &lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
                                        System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to AcquireAccess of depth image data"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                        &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;3&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                    &lt;/SPAN&gt;}
                                }
                            }


                        &lt;SPAN style="color:#808080;"&gt;/*
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        sample.depth.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, dData);
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        if (sts.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR)&amp;lt;0)
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        {
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                            System.out.println ("Failed to AcquireAccess of depth image data");
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                            System.exit(3);
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        }*/
&lt;/SPAN&gt;

&lt;SPAN style="color:#808080;"&gt;                            &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;dBuff[] = &lt;SPAN style="color:#cc7832;"&gt;new int&lt;/SPAN&gt;[dData.&lt;SPAN style="color:#9876aa;"&gt;pitches&lt;/SPAN&gt;[&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;] / &lt;SPAN style="color:#6897bb;"&gt;4 &lt;/SPAN&gt;* &lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;]&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;dData.ToIntArray(&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dBuff)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;d_df.&lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;.setRGB(&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dBuff&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dData.&lt;SPAN style="color:#9876aa;"&gt;pitches&lt;/SPAN&gt;[&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;] / &lt;SPAN style="color:#6897bb;"&gt;4&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;d_df.repaint()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;handData.Update()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;sts = sample.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.ReleaseAccess(dData)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;) &amp;lt; &lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
                                System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to ReleaseAccess of depth image data"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;3&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;}
                        }
                    }
                }
                &lt;SPAN style="color:#cc7832;"&gt;else
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                &lt;/SPAN&gt;{
                    System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to acquire frame"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                &lt;/SPAN&gt;}

                senseMgr.ReleaseFrame()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;}

            senseMgr.Close()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Done streaming"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}
        &lt;SPAN style="color:#cc7832;"&gt;else
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;{
            System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to initialize"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}

        &lt;SPAN style="color:#808080;"&gt;//cframe.dispose();
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;        &lt;/SPAN&gt;dframe.dispose()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}


}

&lt;SPAN style="color:#cc7832;"&gt;class &lt;/SPAN&gt;Listener &lt;SPAN style="color:#cc7832;"&gt;extends &lt;/SPAN&gt;WindowAdapter {
    &lt;SPAN style="color:#cc7832;"&gt;public boolean &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;"&gt;exit &lt;/SPAN&gt;= &lt;SPAN style="color:#cc7832;"&gt;false;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color:#bbb529;"&gt;@Override &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;windowClosing&lt;/SPAN&gt;(WindowEvent e) {
        &lt;SPAN style="color:#9876aa;"&gt;exit&lt;/SPAN&gt;=&lt;SPAN style="color:#cc7832;"&gt;true;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}
}



&lt;SPAN style="color:#cc7832;"&gt;class &lt;/SPAN&gt;DrawFrame &lt;SPAN style="color:#cc7832;"&gt;extends &lt;/SPAN&gt;Component {
    &lt;SPAN style="color:#cc7832;"&gt;public &lt;/SPAN&gt;BufferedImage &lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;    public &lt;/SPAN&gt;DrawFrame(&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;width&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;height) {
        &lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;=&lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;BufferedImage(width&lt;SPAN style="color:#cc7832;"&gt;,&lt;/SPAN&gt;height&lt;SPAN style="color:#cc7832;"&gt;,&lt;/SPAN&gt;BufferedImage.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;TYPE_INT_RGB&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}

    &lt;SPAN style="color:#cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;paint&lt;/SPAN&gt;(Graphics g) {
        ((Graphics2D) g).drawImage(&lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, null&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}

    &lt;SPAN style="color:#cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;drawCenteredCircle&lt;/SPAN&gt;(Graphics g&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;x&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;y&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;r) {
        ((Graphics2D)g).drawImage(&lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, null&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;x = x-(r/&lt;SPAN style="color:#6897bb;"&gt;2&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;y = y-(r/&lt;SPAN style="color:#6897bb;"&gt;2&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;g.setColor(Color.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;blue&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;g.fillOval(x&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;y&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;r&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;r)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}



}&lt;/PRE&gt;</description>
    <pubDate>Mon, 31 Aug 2015 11:44:33 GMT</pubDate>
    <dc:creator>deepak_k_1</dc:creator>
    <dc:date>2015-08-31T11:44:33Z</dc:date>
    <item>
      <title>hand contour detection is not working in java</title>
      <link>https://community.intel.com/t5/Software-Archive/hand-contour-detection-is-not-working-in-java/m-p/1005729#M32049</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;i want to detect a hand contour in java. it is showing black window.&lt;/P&gt;

&lt;P&gt;can any one help me what i am doing wrong here.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;code :&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Courier New';font-size:9.0pt;"&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt;/*******************************************************************************
&lt;/SPAN&gt;
&lt;SPAN style="color:#629755;font-style:italic;"&gt; INTEL CORPORATION PROPRIETARY INFORMATION
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; This software is supplied under the terms of a license agreement or nondisclosure
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; agreement with Intel Corporation and may not be copied or disclosed except in
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; accordance with the terms of that agreement
&lt;/SPAN&gt;&lt;SPAN style="color:#629755;font-style:italic;"&gt; Copyright(c) 2014 Intel Corporation. All Rights Reserved.
&lt;/SPAN&gt;
&lt;SPAN style="color:#629755;font-style:italic;"&gt; *******************************************************************************/
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;intel.rssdk.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.lang.System.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.util.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;javax.swing.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.awt.event.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.awt.image.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;import &lt;/SPAN&gt;java.awt.*&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;public class &lt;/SPAN&gt;contour
{
    &lt;SPAN style="color:#cc7832;"&gt;static int &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cWidth  &lt;/SPAN&gt;= &lt;SPAN style="color:#6897bb;"&gt;640&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    static int &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cHeight &lt;/SPAN&gt;= &lt;SPAN style="color:#6897bb;"&gt;480&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    static int &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    static boolean &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;exit &lt;/SPAN&gt;= &lt;SPAN style="color:#cc7832;"&gt;false;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;    public static void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;main&lt;/SPAN&gt;(String s[])
    {

        PXCMSenseManager senseMgr = PXCMSenseManager.&lt;SPAN style="font-style:italic;"&gt;CreateInstance&lt;/SPAN&gt;()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;pxcmStatus sts &lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;sts = senseMgr.EnableStream(PXCMCapture.StreamType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;STREAM_TYPE_DEPTH&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;cHeight&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)&amp;lt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
            System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.print(&lt;SPAN style="color:#6a8759;"&gt;"Failed to create Stream Instance&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#6a8759;"&gt;"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;1&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}

        sts = senseMgr.EnableHand(&lt;SPAN style="color:#cc7832;"&gt;null&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)&amp;lt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
            System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.print(&lt;SPAN style="color:#6a8759;"&gt;"Failed to enable HandAnalysis&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#6a8759;"&gt;"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;3&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}

        sts = senseMgr.Init()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(sts)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;PXCMCapture.Device device = senseMgr.QueryCaptureManager().QueryDevice()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;PXCMCapture.Device.StreamProfileSet profiles = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMCapture.Device.StreamProfileSet()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;device.QueryStreamProfileSet(profiles)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;device.SetMirrorMode(PXCMCapture.Device.MirrorMode.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;MIRROR_MODE_HORIZONTAL&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth &lt;/SPAN&gt;= profiles.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;imageInfo&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;width&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight &lt;/SPAN&gt;= profiles.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;imageInfo&lt;/SPAN&gt;.&lt;SPAN style="color:#9876aa;"&gt;height&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;Listener listener = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;Listener()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;contour d_raw = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;contour()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;DrawFrame d_df=&lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;DrawFrame(&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;JFrame dframe= &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;JFrame(&lt;SPAN style="color:#6a8759;"&gt;"Intel(R) RealSense(TM) SDK - Depth Stream"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.addWindowListener(listener)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.setSize(&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.add(d_df)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;dframe.setVisible(&lt;SPAN style="color:#cc7832;"&gt;true&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;//hand
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)&amp;gt;=&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
            PXCMHandModule handModule = senseMgr.QueryHand()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;PXCMHandConfiguration handConfig = handModule.CreateActiveConfiguration()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAllGestures()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAllAlerts()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAlert(PXCMHandData.AlertType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ALERT_HAND_DETECTED&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.EnableAlert(PXCMHandData.AlertType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ALERT_HAND_NOT_DETECTED&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.ApplyChanges()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;handConfig.Update()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;PXCMHandData handData = handModule.CreateOutput()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;            while &lt;/SPAN&gt;(listener.&lt;SPAN style="color:#9876aa;"&gt;exit &lt;/SPAN&gt;== &lt;SPAN style="color:#cc7832;"&gt;false&lt;/SPAN&gt;)
            {
                sts = senseMgr.AcquireFrame(&lt;SPAN style="color:#cc7832;"&gt;true&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;                if &lt;/SPAN&gt;(sts == pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;)
                {
                    PXCMCapture.Sample sample = senseMgr.QueryHandSample()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;//PXCMCapture.Sample handSample = senseMgr.QueryHandSample();
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;numOfHands = handData.QueryNumberOfHands()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                    &lt;/SPAN&gt;PXCMPointI32[][] pointOuter = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMPointI32[numOfHands][]&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                    if &lt;/SPAN&gt;(sample.&lt;SPAN style="color:#9876aa;"&gt;depth &lt;/SPAN&gt;!= &lt;SPAN style="color:#cc7832;"&gt;null&lt;/SPAN&gt;)
                    {
                        PXCMImage image = sample.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                        &lt;/SPAN&gt;PXCMImage.ImageData dData = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMImage.ImageData()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                        for &lt;/SPAN&gt;(&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;j = &lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;; &lt;/SPAN&gt;j &amp;lt; numOfHands&lt;SPAN style="color:#cc7832;"&gt;; &lt;/SPAN&gt;j++) {
                            &lt;SPAN style="color:#cc7832;"&gt;int&lt;/SPAN&gt;[] id = &lt;SPAN style="color:#cc7832;"&gt;new int&lt;/SPAN&gt;[&lt;SPAN style="color:#6897bb;"&gt;1&lt;/SPAN&gt;]&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;PXCMImage.ImageData data&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;handData.QueryHandId(PXCMHandData.AccessOrderType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ACCESS_ORDER_BY_TIME&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;j&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;id)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;PXCMHandData.IHand hData = &lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;PXCMHandData.IHand()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;handData.QueryHandData(PXCMHandData.AccessOrderType.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ACCESS_ORDER_BY_TIME&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;j&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;hData)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            if &lt;/SPAN&gt;(handData != &lt;SPAN style="color:#cc7832;"&gt;null&lt;/SPAN&gt;) {
                                &lt;SPAN style="color:#cc7832;"&gt;if &lt;/SPAN&gt;(sts == hData.QuerySegmentationImage(image)) {
                                    sample.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.AcquireAccess(PXCMImage.Access.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;ACCESS_READ&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;PXCMImage.PixelFormat.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PIXEL_FORMAT_RGB32&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dData)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                    if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;) &amp;lt; &lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
                                        System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to AcquireAccess of depth image data"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                        &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;3&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                    &lt;/SPAN&gt;}
                                }
                            }


                        &lt;SPAN style="color:#808080;"&gt;/*
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        sample.depth.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, dData);
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        if (sts.compareTo(pxcmStatus.PXCM_STATUS_NO_ERROR)&amp;lt;0)
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        {
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                            System.out.println ("Failed to AcquireAccess of depth image data");
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                            System.exit(3);
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;                        }*/
&lt;/SPAN&gt;

&lt;SPAN style="color:#808080;"&gt;                            &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;dBuff[] = &lt;SPAN style="color:#cc7832;"&gt;new int&lt;/SPAN&gt;[dData.&lt;SPAN style="color:#9876aa;"&gt;pitches&lt;/SPAN&gt;[&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;] / &lt;SPAN style="color:#6897bb;"&gt;4 &lt;/SPAN&gt;* &lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;]&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;dData.ToIntArray(&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dBuff)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;d_df.&lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;.setRGB(&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dWidth&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;dHeight&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dBuff&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;dData.&lt;SPAN style="color:#9876aa;"&gt;pitches&lt;/SPAN&gt;[&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;] / &lt;SPAN style="color:#6897bb;"&gt;4&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;d_df.repaint()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;handData.Update()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;

&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;sts = sample.&lt;SPAN style="color:#9876aa;"&gt;depth&lt;/SPAN&gt;.ReleaseAccess(dData)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            if &lt;/SPAN&gt;(sts.compareTo(pxcmStatus.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;PXCM_STATUS_NO_ERROR&lt;/SPAN&gt;) &amp;lt; &lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;) {
                                System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to ReleaseAccess of depth image data"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                                &lt;/SPAN&gt;System.&lt;SPAN style="font-style:italic;"&gt;exit&lt;/SPAN&gt;(&lt;SPAN style="color:#6897bb;"&gt;3&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                            &lt;/SPAN&gt;}
                        }
                    }
                }
                &lt;SPAN style="color:#cc7832;"&gt;else
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                &lt;/SPAN&gt;{
                    System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to acquire frame"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;                &lt;/SPAN&gt;}

                senseMgr.ReleaseFrame()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;}

            senseMgr.Close()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;            &lt;/SPAN&gt;System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Done streaming"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}
        &lt;SPAN style="color:#cc7832;"&gt;else
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;{
            System.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;out&lt;/SPAN&gt;.println(&lt;SPAN style="color:#6a8759;"&gt;"Failed to initialize"&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;}

        &lt;SPAN style="color:#808080;"&gt;//cframe.dispose();
&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;        &lt;/SPAN&gt;dframe.dispose()&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}


}

&lt;SPAN style="color:#cc7832;"&gt;class &lt;/SPAN&gt;Listener &lt;SPAN style="color:#cc7832;"&gt;extends &lt;/SPAN&gt;WindowAdapter {
    &lt;SPAN style="color:#cc7832;"&gt;public boolean &lt;/SPAN&gt;&lt;SPAN style="color:#9876aa;"&gt;exit &lt;/SPAN&gt;= &lt;SPAN style="color:#cc7832;"&gt;false;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color:#bbb529;"&gt;@Override &lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;windowClosing&lt;/SPAN&gt;(WindowEvent e) {
        &lt;SPAN style="color:#9876aa;"&gt;exit&lt;/SPAN&gt;=&lt;SPAN style="color:#cc7832;"&gt;true;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}
}



&lt;SPAN style="color:#cc7832;"&gt;class &lt;/SPAN&gt;DrawFrame &lt;SPAN style="color:#cc7832;"&gt;extends &lt;/SPAN&gt;Component {
    &lt;SPAN style="color:#cc7832;"&gt;public &lt;/SPAN&gt;BufferedImage &lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;    public &lt;/SPAN&gt;DrawFrame(&lt;SPAN style="color:#cc7832;"&gt;int &lt;/SPAN&gt;width&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;height) {
        &lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;=&lt;SPAN style="color:#cc7832;"&gt;new &lt;/SPAN&gt;BufferedImage(width&lt;SPAN style="color:#cc7832;"&gt;,&lt;/SPAN&gt;height&lt;SPAN style="color:#cc7832;"&gt;,&lt;/SPAN&gt;BufferedImage.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;TYPE_INT_RGB&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}

    &lt;SPAN style="color:#cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;paint&lt;/SPAN&gt;(Graphics g) {
        ((Graphics2D) g).drawImage(&lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, null&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;
&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}

    &lt;SPAN style="color:#cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color:#ffc66d;"&gt;drawCenteredCircle&lt;/SPAN&gt;(Graphics g&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;x&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;y&lt;SPAN style="color:#cc7832;"&gt;, int &lt;/SPAN&gt;r) {
        ((Graphics2D)g).drawImage(&lt;SPAN style="color:#9876aa;"&gt;image&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#6897bb;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, null&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;x = x-(r/&lt;SPAN style="color:#6897bb;"&gt;2&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;y = y-(r/&lt;SPAN style="color:#6897bb;"&gt;2&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;g.setColor(Color.&lt;SPAN style="color:#9876aa;font-style:italic;"&gt;blue&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;        &lt;/SPAN&gt;g.fillOval(x&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;y&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;r&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;r)&lt;SPAN style="color:#cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;    &lt;/SPAN&gt;}



}&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Aug 2015 11:44:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/hand-contour-detection-is-not-working-in-java/m-p/1005729#M32049</guid>
      <dc:creator>deepak_k_1</dc:creator>
      <dc:date>2015-08-31T11:44:33Z</dc:date>
    </item>
  </channel>
</rss>

