Android's Contrib.applyColorMap results in flipped red and blue (BGR) (Bug #3442)


Added by Christopher Boyd about 11 years ago. Updated about 11 years ago.


Status:Cancelled Start date:2013-12-18
Priority:Normal Due date:
Assignee:Alexander Smorkalov % Done:

0%

Category:android
Target version:2.4.9
Affected version:2.4.8 (latest release) Operating System:Android
Difficulty: HW Platform:ARM
Pull request:

Description

I'm not entirely sure if this is intentional or not, as I've seen online that OpenCV seems to like BGR.

In any case, Android's Utils.matToBitmap requires RGB as input.

There's a simple work-around of using:
Imgproc.cvtColor(cmap, cmap, Imgproc.COLOR_RGB2BGR);

But it seems like that's additional processing that shouldn't be required.

Either applyColorMap should result in RGB for Android or matToBitmap should allow you to specify between RGB or BGR.


History

Updated by Alexander Smorkalov about 11 years ago

  • Target version changed from 2.4.8 to 2.4.9

Updated by Alexander Smorkalov about 11 years ago

applyColorMap is native C++ function for all platforms. If I change it, it affected all platforms or make function logic incompatible with other platform. I understand, that color conversion from BGR to RGB is ambiguous, but it looks like the only possible solution. Also, we have to save binary compatibility in branch 2.4 that makes the changes impossible too. I cancel the ticket.

  • Affected version changed from 2.4.7 (latest release) to 2.4.8 (latest release)
  • Status changed from New to Cancelled

Also available in: Atom PDF