Skip to content

CUDA equalizeHist does not produce identical result #18035

@rgov

Description

@rgov
System information (version)
  • OpenCV => 4.4.0
  • Operating System / Platform => Linux
  • Compiler => gcc
Detailed description

I get different results between cv2.equalizeHist and cv2.cuda.equalizeHist on the same image.

Similar to: #10330.

Steps to reproduce

For this image, the code:

import cv2

frame = cv2.imread('20170727034000501_85626.jpg')
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

eqframe = cv2.equalizeHist(frame)
cv2.imwrite('eqframe_cpu.jpg', eqframe)

frame = cv2.cuda_GpuMat(frame)
eqframe_gpu = cv2.cuda.equalizeHist(frame)
eqframe = eqframe_gpu.download()

cv2.imwrite('eqframe_gpu.jpg', eqframe)

Produces for the CPU:

eqframe_cpu

And for the GPU:

eqframe_gpu

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions