MinMax Thresholding (Feature #2792)


Added by Gilad Kapelushnik about 12 years ago. Updated about 12 years ago.


Status:Cancelled Start date:2013-02-11
Priority:Normal Due date:
Assignee:Gilad Kapelushnik % Done:

0%

Category:imgproc, video
Target version:2.4.4
Difficulty: Pull request:

Description

Hi,

I'm working allot with single type images and I have many cases, after multiple procedures, were I have to truncate all the values above some value, lets say 255, and truncate all the values below some value, lets say 0.

So what I would like to do is: Images[i].ThresholdTrunc(0.0,255.0)
After this operation all the values that are above 255.0 will get a value of 255.0 and all the values bellow 0.0 will get the value 0.0.

Gilad.


Associated revisions

Revision 68165b1a
Added by Roman Donchenko almost 11 years ago

Merge pull request #2792 from SpecLad:merge-2.4

History

Updated by Kirill Kornyakov about 12 years ago

You should use min and max functions consecutively, like here Image = min(255.0, max(0.0, Image)); There are no plans to add a function like in your request, so if you really need it, you can implement it and propose on the GitHub. But please note, that OpenCV's API is very conservative, so the code may be not included, since there is a cheap alternative with min and max functions.

  • Category set to imgproc, video
  • Target version set to 2.4.4
  • Assignee set to Gilad Kapelushnik
  • Status changed from Open to Cancelled

Updated by Kirill Kornyakov about 12 years ago

Gilad, it seems to me that many of your tickets are cancelled. That probably means that you should prefer OpenCV Q&A forum: http://www.answers.opencv.org. Please use the forum before you post something to the issue tracker. And if the community likes you proposal (many people voted with +1), we'll be happy to see a ticket. And if you'll not follow our advice, you account may be suspended, since there is too much noise from you...

If you really want to help to OpenCV project, please work on existing bugs and provide your fixes in a form of pull requests! We'll be happy to see you among contributors, not annoying reporters!

Also available in: Atom PDF