First time here? Check out the FAQ!

Ask Your Question
2

Is the Erode and Dilate images mixed up in the Doc

asked Jul 9 '13

AnthonyKeane gravatar image

updated Jul 9 '13

In reading This Page it appears Dilate and Erode are transposed.

Dilate expands the Black area? Erode reduces the black area?

Erode-----Dilate---->image description

image description-----Erode----->Erode

Should a Bug report be filed?

Preview: (hide)

Comments

Not sure if the error has been rectified or you got it all wrong :| .

Dilate -> Local Maximum. Erode -> Local Minimum.

Prasanna gravatar imagePrasanna (Jul 9 '13)edit

3 answers

Sort by » oldest newest most voted
1

answered Jul 9 '13

It actually is a bug. The guide acts from the background so it is correctly but never intended this way. If you look at erosion and dilation it is mostly described from view of the object, being letters here. If you know what you doing it is no pro lem, but for new users this is co.fusing. I have filed a bug report and will adapt documentation when I have the time.

Preview: (hide)

Comments

1

It is not a bug! Documentation is correct!

AlexanderShishkov gravatar imageAlexanderShishkov (Jul 10 '13)edit

Actually it is not really a bug, but more a way of understanding it :) If you look for erosion and dialation in books or on wikipedia, it is explained as if the object is seen as zero values... So i was mistaken there and was looking for a way to explain it more clear, thats all :)

StevenPuttemans gravatar imageStevenPuttemans (Jul 10 '13)edit
3

answered Jul 9 '13

AMP gravatar image

updated Jul 10 '13

AlexanderShishkov gravatar image

Dilation and erosion work on white pixels(pixels with 1 value) so when you dilate above image you expand white area and when eroding reduce white area.

So there is not any bug!

Preview: (hide)
1

answered Jul 10 '13

AlexanderShishkov gravatar image

Documentation is correct in this section! White pixels have 255 value, black ones - 0. After dilate square of black pixels should decrease, because we choose maximum in each window.

Preview: (hide)

Comments

http://code.opencv.org/issues/2971 could you close down this bug issue then? Or do you still want me to add some comment on why there is a difference in explanation between Wikipedia & OpenCV docs?

StevenPuttemans gravatar imageStevenPuttemans (Jul 16 '13)edit

Question Tools

Stats

Asked: Jul 9 '13

Seen: 605 times

Last updated: Jul 10 '13