c++ - What's the best way to detect a white ball on the water surface by using opencv? -


i put small white ball on water surface. wind makes white ball move in water. want using opencv detect , track ball.because background(water surface) single color, ball single color. use color in hsv , set threshold detect white color(ball). think way easier , better camshift, tld, optical flow method. have problem, detect white color find ball, wind strong , water wave happen follow ball. pic follow

enter image description here

the wave have white color in hsv. when use findcontours edge of ball, edge including ball , wave. have tried use erode , dilate remove wave noise.but can't result. have no idea now. can , show me how can remove wave in better way? i'm not sure using color detect ball best choice in case. maybe should try camshift, tld, optical flow method? can show idea me?thanks in advance!!

i can't think of perfect solution @ moment can suggest strategy can atleast mis-detect ball.

the optical flow of whole scene can find velocities of pixels or selected keypoints. once find velocity of scene then, need set threshold value stop detecting ball if velocity of scene higher.

waves -> water moves fast-> velocity of pixels increases (in x or y direction) -> optical flow tell situation -> stop ball detection hsv method.

in words, apply existing hsv method based ball detection method if water not moving fast , can know velocity using optical flow method.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -