Skip to content

Instantly share code, notes, and snippets.

@mlashcorp
Created January 19, 2012 19:06
Show Gist options
  • Save mlashcorp/1641862 to your computer and use it in GitHub Desktop.
Save mlashcorp/1641862 to your computer and use it in GitHub Desktop.
equalize color image histogram
std::vector<cv::Mat> planes;
cv::cvtColor(mat, sharp_mat, CV_BGR2HSV);
cv::split(sharp_mat, planes);
cv::equalizeHist(planes[2], planes[2]);
cv::merge(planes, sharp_mat);
cv::cvtColor(sharp_mat, mat, CV_HSV2BGR);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment