How to detect wide ball in cricket using MATLAB. What should be the simple code for it.

조회 수: 6 (최근 30일)
I have deficulty in writing matlab code for detection of wide ball in cricket.
  댓글 수: 6
Awais Qarni
Awais Qarni 2023년 1월 3일
Video is of our own choice ,from Google as well .only detection of wide ball is important.video could be a few seconds showing balling of the bowler and the program will determine whether it is wide ball or not .
Bjorn Gustavsson
Bjorn Gustavsson 2023년 1월 3일
@Awais, as far as I understand it is necessary to know the ball's trajectory explicitly in 3-D in order to judge whether the ball is wide or not. To do that one would prefer to have at least bi-static videos with well known camera-parameters in order to do steroscopic triangulation. Lacking that you might get good enough estimate of the distance-from-camera from the known size of the ball - provided you have some very good image of a well known object (wicket should do, I think). If you have a video above from behind the bowler it should also work - but now we're starting to use domain-specific inferences, and my domain-specific knowledge on cricket is pretty much used up by writing "wicket" and "bowler".

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2023년 1월 3일
편집: Image Analyst 2023년 1월 3일
@Muhammad and @Awais Qarni (are you working together on this project?)
You need to segment each video frame to detect the ball. If it's moving fast, then it will be blurred or faint/transparent and you probably can't get an accurate size, at least in the direction of motion.
If you have any more questions, then attach your one of your frames with the ball in it and code to read it in with the paperclip icon after you read this:
For an example of how to find a contrasting round object in an image, see my Image Processing Tutorial in my File Exchange:
where I find coins and get their location and diameter.

Bjorn Gustavsson
Bjorn Gustavsson 2023년 1월 4일
One thing you can (should) try is to look at the differences between frames, that is subtract the previous frame from the current frame. That will hopefully effectively remove everything that is not moving rapidly between frames (should be almost everything except the bowlers arm). In order to do this you better convert the frames from uint8 or whatever data-type you get the individual frames into doubles. That will make most of the difference-frame close to zero and the ball a positive-negative double-hump, positive where it is in the current frame and negative where it was in the previous frame. That way you can extract the position and trajectory of the ball along the video-sequence.
HTH
  댓글 수: 3
Bjorn Gustavsson
Bjorn Gustavsson 2023년 1월 5일
@Image Analyst, true. In most cases where I typically don't know which direction things are moving, I have found it useful to have the positive-negative bumps as a Q-D indicator of what direction things move in. That might not be too important here when that is more or less given (right?).

댓글을 달려면 로그인하십시오.

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by