calcHist silently missing datatype support (Bug #856)


Added by Johannes Jordan about 14 years ago. Updated about 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

If you look at the code in imgproc/src/histogram.cpp, lines 616-619, 781-784:
Histogram is only calculated for CV_8U and CV_32F datatypes. Even though the function called is templated and should work for other types.

To make things worse, if you have input data in another format, silently no histogramming is done. You are left with an empty histogram.


Associated revisions

Revision 17dc1e13
Added by Vadim Pisarevsky about 14 years ago

added 16u support in calcHist & calcBackProject; added image type checks (ticket #856)

Revision 1fe7ad85
Added by Vadim Pisarevsky almost 12 years ago

Merge pull request #856 from ericgreveson:master

History

Updated by Vadim Pisarevsky about 14 years ago

thanks! In r4774 the type checks have been added, as well as added 16u image support.

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF