Ask Your Question
1

Is it possible to run filter2D at just one point in an image?

asked 2014-09-30 15:29:04 -0600

_Robert gravatar image

updated 2019-01-25 13:38:56 -0600

I am currently running filter2D:

cv::filter2D(source, 
              dest, 
              CV_64F, 
              kernal, 
              cv::Point(-1,-1), 
              0, 
              cv::BORDER_CONSTANT);

However, I am not interested in convoluting the whole image with a kernel, I just want to run the convolution at a given point.

Is this possible?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2014-09-30 16:31:17 -0600

_Robert gravatar image

Just seen a note from the documentation which suggests this will just work by cropping a 1px ROI - Note When the source image is a part (ROI) of a bigger image, the function will try to use the pixels outside of the ROI to form a border. To disable this feature and always do extrapolation, as if src was not a ROI, use borderType | BORDER_ISOLATED.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-09-30 15:29:04 -0600

Seen: 433 times

Last updated: Sep 30 '14