Bug in gpu::warpAffine when input is GpuMat with 4 channels, uchar (Bug #1991)


Added by Karl-Gustav Johansson almost 13 years ago. Updated almost 13 years ago.


Status:Done Start date:2012-05-28
Priority:High Due date:2012-06-01
Assignee:Vladislav Vinogradov % Done:

0%

Category:gpu (cuda)
Target version:2.4.1 Estimated time:2.00 hours
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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

Revision 6f32fb02
Added by Vladislav Vinogradov almost 13 years ago

Bug #1991 : fixed gpu interpolation (remap, resize, warp...)

Revision 72d2311e
Added by Vladislav Vinogradov almost 13 years ago

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! :)

Also available in: Atom PDF