Newbie

Group: Members
Posts: 1
Member No.: 30045
Joined: 27-February 11

|
Hello. I have just started creating my first filter. I'm using the SDK sample from this site. I've got a grayscale depth video (from Kinnect) and I need to make the front layer objects white (paint them 0xffffff). So I planned on comparing pixels with a treshold and painting it white.
Processing video frames:
void VerticalBlurFilter::DepthFunction(void *dst0, ptrdiff_t dstpitch, const void *src0, ptrdiff_t srcpitch, uint32 w, uint32 h) { uint32 *dst = (uint32 *)dst0; const uint32 *src = (const uint32 *)src0; uint32 threshold = (0xbbbbbb); // loop over all rows for(int y=0; y<h; ++y) { // loop over all pixels in current row for(int x=0; x<w; ++x) { uint32 pixelValue = src[x];
//this is my comparing if (pixelValue>threshold) dst[x] = pixelValue; else dst[x] = 0xffffff; } // advance to next row in destination and source pixmaps dst = (uint32 *)((char *)dst + dstpitch); src = (const uint32 *)((const char *)src + srcpitch); } }
But when I start this filter in VirtualDub I'm getting white parallel lines across objects instedd of solid white objects:
 I'm guessing that it's a newbie question, but if somebody knows or has any suggestions about the nature of these lines it would be very helpful.
|