Ask Your Question
0

Questions about the filter2D

asked 2013-10-25 22:41:16 -0600

Yi Zhang gravatar image

The parameter anchor of the function filter2D indicates the relative position of a filtered point within the kernel; But what is the detail of processing the value of the anchor?

For example: image description

The default value (-1,-1) means that the anchor is at the kernel center, but I think in this case the anchor.x and anchor.y are not equal to -1? What is the real value of the anchor? And how dose OpenCV process the value of the anchor?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2013-10-26 04:26:00 -0600

Ilya Lavrenov gravatar image

updated 2013-10-26 04:27:08 -0600

the anchor Point(-1, -1) means that OpenCV function must automatically puts a filtered pixel at the kernel center. For example, if a kernel has size Size(5, 5) then an anchor will be Point(2, 2).

edit flag offensive delete link more

Comments

1

That means anchor.x = 2 and anchor.y = 2?

Yi Zhang gravatar imageYi Zhang ( 2013-10-30 21:13:01 -0600 )edit

yes, anchor.x = anchor.y = 2 for this case.

Ilya Lavrenov gravatar imageIlya Lavrenov ( 2013-11-08 15:04:38 -0600 )edit

Question Tools

Stats

Asked: 2013-10-25 22:41:16 -0600

Seen: 220 times

Last updated: Oct 26 '13