Hi guys.
I try to use a kinect depth to filter the hand on the table, I can’t use the hand node because I don’t see de the user, I only see the hand’s.
I can filter the image with using a simple pixelshader
float RED = 1;
float GREEN = 1;
float BLUE = 1;
float Tolerancia = 0;
float4 PS(vs2ps In): COLOR
{
float4 col = tex2D(Samp, In.TexCd);
if (
( col.r >= (RED-Tolerancia) ) && ( col.r <= (RED+Tolerancia) ) &&
( col.g >= (GREEN-Tolerancia) ) && ( col.g <= (GREEN+Tolerancia) )&&
( col.b >= (BLUE-Tolerancia) ) && ( col.b <= (BLUE+Tolerancia) )
)
{
if(
( col.r == RED ) && ( col.g == GREEN ) && ( col.b == BLUE )
)
{
return float4 (1,0,0,1);
}else{
return col;
}
}else
{
return float4(0,0,0,1);
}
}
I compare de each pixel with the expecific input color and apply a tolerance level to create a specific width zone.
The problem is:
When I put the hand in the escene, the range level change in the kinect depth image.
I adjunt the pacht.
test kinect.rar (5.6 kB)