Skip to content

Get a black image after using cv::cuda::equalizeHist but cv::equalizeHist works correctly #10330

@AlexanderKomarov

Description

@AlexanderKomarov

I get a black image after using cv::cuda::equalizeHist on my image but cv::equalizeHist works good on it.
For lena.jpg cv::cuda::equalizeHist works correctly.

System information (version)
  • OpenCV => 3.3.1 or master
  • Operating System / Platform => Ubuntu 16.04 64 bit
  • Compiler => gcc-5.4
Steps to reproduce

I used this code:

auto img = cv::imread("./img.png", CV_LOAD_IMAGE_GRAYSCALE);

cv::cuda::GpuMat img_gpu(img);
// cv::equalizeHist(img, img);
// cv::Mat img_(img);
cv::cuda::equalizeHist(img_gpu, img_gpu);
cv::Mat img_(img_gpu);

cv::imwrite("./img_eq.png", img_);

my image
img
results of cuda version
img_eq_cuda
results of cpu version
img_eq_cpu

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions