Ask Your Question
2

Is the Erode and Dilate images mixed up in the Doc

asked 2013-07-09 01:37:52 -0500

AnthonyKeane gravatar image

updated 2013-07-09 01:45:38 -0500

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?

edit retag flag offensive close merge delete

Comments

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

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

Prasanna gravatar imagePrasanna ( 2013-07-09 06:49:07 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2013-07-09 11:07:36 -0500

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.

edit flag offensive delete link more

Comments

1

It is not a bug! Documentation is correct!

AlexanderShishkov gravatar imageAlexanderShishkov ( 2013-07-10 10:20:44 -0500 )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 ( 2013-07-10 17:04:01 -0500 )edit
3

answered 2013-07-09 07:47:01 -0500

AMP gravatar image

updated 2013-07-10 10:21:40 -0500

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!

edit flag offensive delete link more
1

answered 2013-07-10 10:26:57 -0500

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.

edit flag offensive delete link more

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 ( 2013-07-16 07:35:43 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-07-09 01:37:52 -0500

Seen: 374 times

Last updated: Jul 10 '13