Use it wise(UPDATED!)
There are two seperate parts to this code one which involves building the robot to follow the ball and the other to detect the ball (which is this code....)
Step 1: Install a PC controlled program onto your controller(ATMEGA 16/32) using your .HEX file in AVRDUDE.gui file created either from BASCOM or any other compiler.........
Step 2:start capturing a video of the ball placed in front of your webcam and then store an image of the ball by using the a=getsnapshot(videoname);
Step 3: Now use the ballfollower code for this you can use your webcam head as well.......take readings of the ball minimum and maximum values Of red green and blue through an imview() command in MATLAB command window
STEP 4:mount the webcam on the bot and there your ballfollower is ready!
Cite As
Shalom Cohen (2024). General BallFollower Code (https://www.mathworks.com/matlabcentral/fileexchange/28918-general-ballfollower-code), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- FPGA, ASIC, and SoC Development > Vision HDL Toolbox > Video Formats and Interfaces >
- Image Processing and Computer Vision > Vision HDL Toolbox > Video Formats and Interfaces >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.