Ask Your Question
0

error: 'COLORMAP_JET' was not declared in this scope

asked 2015-07-21 03:14:28 -0500

updated 2018-10-29 06:28:38 -0500

I encountered the following error while trying to display a JET Colormap for my image:

applyColorMap(src(cv::Range(0, bitmapInfo.height), cv::Range(0, bitmapInfo.width)), output, COLORMAP_JET);

Error:

jni/ImageProcessing.cpp:93:98: error: 'COLORMAP_JET' was not declared in this scope
  applyColorMap(src(cv::Range(0, bitmapInfo.height), cv::Range(0, bitmapInfo.width)), output, COLORMAP_JET);
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-21 03:18:57 -0500

Nevermind, I modified COLORMAP_JET including its namespace cv and it worked fine:

applyColorMap(src(cv::Range(0, bitmapInfo.height), cv::Range(0, bitmapInfo.width)), output, cv::COLORMAP_JET);

Apparently, this is written in the documentation:

cv::ColormapTypes {
cv::COLORMAP_AUTUMN = 0,
cv::COLORMAP_BONE = 1,
cv::COLORMAP_JET = 2,
cv::COLORMAP_WINTER = 3,
cv::COLORMAP_RAINBOW = 4,
cv::COLORMAP_OCEAN = 5,
cv::COLORMAP_SUMMER = 6,
cv::COLORMAP_SPRING = 7,
cv::COLORMAP_COOL = 8,
cv::COLORMAP_HSV = 9,
cv::COLORMAP_PINK = 10,
cv::COLORMAP_HOT = 11,
cv::COLORMAP_PARULA = 12

}

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-07-21 03:14:28 -0500

Seen: 433 times

Last updated: Jul 21 '15