pupil-labs / pupil

Open source eye tracking
https://pupil-labs.com
GNU Lesser General Public License v3.0
1.49k stars 679 forks source link

unnecessary gaussian blur? #1465

Closed einsweniger closed 5 years ago

einsweniger commented 5 years ago

Hi!

Commit https://github.com/pupil-labs/pupil/commit/3cd1a1cf253d34fa84f69a7f0aad55f82816d93a#diff-0ba20614a38ba70897e1256fac1d08a8L19 changed the mean filter to a gaussian filter, while still keeping the gaussian blur.

The adaptiveThreshold with a gaussian filter will do another blur pass with a larger block size (https://github.com/opencv/opencv/blob/40da61a314cef5aeb12ae4b4f05ab47fa5286d21/modules/imgproc/src/thresh.cpp#L1656). Is it intentional or kept by mistake?

mkassner commented 5 years ago

@ChingT I think you refactored this. Any idea?

ChingT commented 5 years ago

Hi @einsweniger, thank you for the comment. The reason I kept GaussianBlur apart from the blur pass in the adaptiveThreshold method is to remove some of small noises which may not be removed if there is only one gaussian filter (in adaptiveThreshold method) applied.

einsweniger commented 5 years ago

@ChingT I've seen that when I was chaining back through git blame, but the comment was lost in the process since then, just checking :D Thank you!