morousg / cvGPUSpeedup

A faster implementation of OpenCV-CUDA that uses OpenCV objects, and more!
Apache License 2.0
34 stars 5 forks source link

Allow to operate on pixels before interpolation #69

Closed morousg closed 9 months ago

morousg commented 9 months ago

We want to be able to Interpolate on RGB pixels, reading from YUV or other types of images, directly.

For that, we will separate the interpolate function into read 2x2 and interpolate functions.

The result of the read, 4 pixels, will be passed to the device function that converst the corresponding YUV to the corresponding RGB. To do so, we need to return an struct with the 4 pixels, and pass them to a DeviceFunction that applies the same operation to each of the pixels, and returns a data type with the 4 converted pixels.

Then we will pass the 4 converted pixels either to the same new DeviceFunction to apply 4 more operations, or to the interpolation operation that will return a single pixel.