Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
how to change current depth map and display it
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tal  
View profile  
 More options Aug 28 2012, 5:38 am
From: Tal <talco...@gmail.com>
Date: Tue, 28 Aug 2012 02:38:08 -0700 (PDT)
Local: Tues, Aug 28 2012 5:38 am
Subject: how to change current depth map and display it

hello,
I tried to change my depth image and to display it with glutDisplay.
I wrote the following code:
XnPoint3D projection, pPosition2;
                pPosition2.X=handXPos;
                pPosition2.Y=handYPos;
                pPosition2.Z=handZPos;
                printf(" position drewSquare: (%f, %f, %f)\n",
pPosition2.X,pPosition2.Y,pPosition2.Z);

g_depth.ConvertRealWorldToProjective(1,&pPosition2,&projection);

                g_depth.GetMetaData(g_depthMD);
                XnDepthPixel* depth = g_depthMD.WritableData();
                const XnDepthPixel* depthData = g_depthMD.Data();
                int x = projection.X;
                int y = projection.Y;
                int handDepth = depthData[y*g_depthMD.XRes() + x];
                printf("X projection: %d, Y projection: %d\n",x,y);
                for (int i = -100; i<100; i++) {
                    for (int j = -100; j<100; j++){
                        depth[(y+j)*g_depthMD.XRes() + (i+x)] = 0;
                        //g_depthMD.WritableData()[(y+j)*g_depthMD.XRes() +
(i+x)]=0;

                    }
                }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tal  
View profile  
 More options Aug 28 2012, 5:44 am
From: Tal <talco...@gmail.com>
Date: Tue, 28 Aug 2012 02:44:20 -0700 (PDT)
Local: Tues, Aug 28 2012 5:44 am
Subject: Re: how to change current depth map and display it

the code above try to create a black square in some area of the depth map
from reason I don't understand it displays the regular depth map without
the change.
I guess I need to update the depth map (g_depthMD and\ or g_depth) by the
new created depth map ('depth' as called above) but I don't know how.

thanks in advance


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »