Bug in equalizeHist? (Bug #2678)


Added by Bostjan Vesnicer about 12 years ago. Updated about 12 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:imgproc, video
Target version:2.4.4
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/284

Description

There is a possible regression in equalizeHist function. equalizeHist produces incorrect result if applied on a subimage (ROI). On the other hand, the 2.4.3 version of the same function behaves as one would expect.


EqualizeHist_Demo.cpp - sample code (955 Bytes) Bostjan Vesnicer, 2013-01-10 09:26 am

dst_2.4.3.png - resulting image (OpenCV version 2.4.3) (2.4 kB) Bostjan Vesnicer, 2013-01-10 09:26 am

dst_47963f0.png - resulting image (OpenCV version 47963f008344fdf0ef355e4ad17310bd6fabe76b) (2.1 kB) Bostjan Vesnicer, 2013-01-10 09:26 am


Associated revisions

Revision 6131a847
Added by Andrey Kamaev about 12 years ago

Fix histogram calculation in equalizeHist

issue #2678

Revision 87210690
Added by Alexander Alekhin almost 11 years ago

Merge pull request #2678 from intbots:master

History

Updated by Andrey Pavlenko about 12 years ago

  • Assignee changed from Vadim Pisarevsky to Andrey Kamaev
  • Start date deleted (2013-01-03)

Updated by Daniil Osokin about 12 years ago

Bostjan, please, attach a test sample and initial data to reproduce this bug. Which version of OpenCV has a bug?

Updated by Kirill Kornyakov about 12 years ago

Without the data and sample for reproducing, this ticket will be closed soon...

  • Assignee changed from Andrey Kamaev to Bostjan Vesnicer
  • Priority changed from High to Low
  • Target version deleted (2.4.4)

Updated by Bostjan Vesnicer about 12 years ago

I attach a sample code that demonstrates the bug. If I run the program using the 2.4.3 version, I am getting the dst_2.4.3.png image as a result; if I run it using the 47963f008344fdf0ef355e4ad17310bd6fabe76b version, I am getting the dst_47963f0.png as a result. Those are clearly different.

P.S. I am using lena.jpg as a source image.

Updated by Andrey Kamaev about 12 years ago

The fix is proposed: https://github.com/Itseez/opencv/pull/284

There is a copy-pasted ++ which breaks histogram calculation if image width is not multiple of 4.

  • Priority changed from Low to Normal
  • Pull request set to https://github.com/Itseez/opencv/pull/284
  • Assignee changed from Bostjan Vesnicer to Andrey Kamaev
  • Target version set to 2.4.4

Updated by Andrey Kamaev about 12 years ago

The fix is pushed to 2.4

  • Status changed from Open to Done

Also available in: Atom PDF