FAQ Database Discussion Community

Calculate intersecting coordinates from vector

Given a vector (or two points) how can i get the discrete coordinates that this vector intersects in some given interval? I am using this such that given a ray(vector) i can calculate the pixels in an image that this ray intersects and use these as indexes for my image....

Compress “sparse data” with CUDA (CCL: connected component labeling reduction)

I have a 5 million list of 32 bit integers (actually a 2048 x 2560 image) that is 90% zeros. The non-zero cells are labels (e.g. 2049, 8195, 1334300, 34320923, 4320932) that completely not sequential or consecutive in any way (it is the output of our custom connected component labeling...

inconsistent timing from .net StopWatch

I have a C# & .NET application that uses a GPU (NVIDA GTX980) to do image processing. There are 4 stages and I synch the CPU to the GPU (no overlap in time) to do timing. But the numbers do not add up. Launch() will do a async launch of...