Ask Your Question

LoopUniverse's profile - activity

2015-11-08 20:01:23 -0500 received badge  Taxonomist
2012-08-04 01:31:24 -0500 received badge  Student (source)
2012-08-01 18:44:01 -0500 asked a question Behavior of "Not-a-Number" (NaN) values in remap

In the cv::remap function, is the behavior specified when values in the "map" arrays are NaN (not-a-number)? Or is the behavior unspecified and having NaN's in the "map" arrays should simply not be done?

The behavior I am seeing (v2.4.1) is pixels where the map value are NaN, the destination value corresponds to the "source image" value at coordinate (0, 0). This appears to be true regardless of the border mode I use.

2012-07-14 14:20:41 -0500 received badge  Notable Question (source)
2012-07-13 20:37:58 -0500 received badge  Editor (source)
2012-07-13 20:37:08 -0500 received badge  Popular Question (source)
2012-07-12 17:25:06 -0500 asked a question filter2D and sepFilter2D, specifying the value for a constant border

When calling filter2D and sepFilter2D, I want to use a constant border, which I do by providing BORDER_CONSTANT for the "borderType" parameter as specified in the documentation (http://docs.opencv.org/modules/imgproc/doc/filtering.html?highlight=gaussianblur#filter2d).

However, I do not see how I can specify WHAT I want that constant value to be. How do I achieve this?

(edit: I did find that the default constant border value seems to be 0.)

(edit in reply to Alexander, I do not see how to reply directly to answers: If I am not mistaken, copyMakeBorder will allocate a new image and copy the input image to a subregion of that new image. That seems a little excessive just to get access to the the ability to have non-zero constant border interpolation methods. Is there any other way to change the constant border value that does not require such memory allocations and copies?)