Bug in gpu::warpAffine when input is GpuMat with 4 channels, uchar (Bug #1991)
Description
Bug in gpu::warpAffine when input is GpuMat with 4 channels, uchar.
There is an x and y offset that moves the image when using 4 channel uchar gpumat, altough the image shouldnt move.
When using 3 channel uchar the function works as expected.
Sample:
Not working (4 channels) - result is a constant x and y translation of the image
Mat affineTransform = cv::estimateRigidTransform(img2Points, img1Points, false);
videoFrameGPU.copyTo(bufferVideoFrameGPU);
gpu::warpAffine(bufferVideoFrameGPU, videoFrameGPU, affineTransform, bufferVideoFrameGPU.size(), CV_INTER_LINEAR);
working (3 channels):
Mat affineTransform = cv::estimateRigidTransform(img2Points, img1Points, false);
gpu::cvtColor(videoFrameGPU, bufferVideoFrameGPU, CV_BGRA2BGR);
bufferVideoFrameGPU.copyTo(bufferVideoFrame2GPU);
gpu::warpAffine(bufferVideoFrameGPU, bufferVideoFrame2GPU, affineTransform, bufferVideoFrame2GPU.size(), CV_INTER_LINEAR);
My platform is:
Windows 7, 64 bit.
GPU: Nvidia GeForce 580m.
Processor: Intel i7
OpenCV: 2.4.0
Associated revisions
Bug #1991 : fixed gpu interpolation (remap, resize, warp...)
Merged revision(s) 8495 from trunk:
Bug #1991 : fixed gpu interpolation (remap, resize, warp...)
........
History
Updated by Karl-Gustav Johansson almost 13 years ago
Note: videoFrameGPU is a 4 channel uchar image.
Updated by Vladislav Vinogradov almost 13 years ago
- Assignee changed from Anatoly Baksheev to Vladislav Vinogradov
Updated by Vladislav Vinogradov almost 13 years ago
The implementations differed in interpolation method. Fixed it. Now there shouldn't be displacement on 4-channel image.
- Status changed from Open to Done
- Target version set to 2.4.1
Updated by Karl-Gustav Johansson almost 13 years ago
Nice, good work! :)