circle detection from drones camera

3 visualizzazioni (ultimi 30 giorni)
ugonna
ugonna il 8 Ago 2023
Commentato: Vineeth Nair il 22 Mar 2024
hello please who knows how can i write a matlab function that checks for rhe presence of a circle in a drones camera and then make the drone hover when it sees the circle
  2 Commenti
Image Analyst
Image Analyst il 8 Ago 2023
Modificato: Image Analyst il 8 Ago 2023
You forgot to attach any images. It ranges from easy to very difficult depending on what the circles look like. Are they high contrast discs on a uniform background (very easy)? Are the faint rings with broken sections (very difficult)?
Anyway you have two tasks here: (1) locate the circle using image processing/computer vision software, and then once you've found it, (2) tell the drone somehow to move so that the circle is centered in the image (possibly, optional) and then stop moving (until further directions are given, not forever obviously).
ugonna
ugonna il 8 Ago 2023
they are high contrast circles. thats the main issue how do i write a function that can take video from the camera as input in real time and time and track the circle as output. I dont really know much about image processing as i mostly use matlab for vehicle design. but i need it for the matlab mini drone competetion

Accedi per commentare.

Risposte (1)

Image Analyst
Image Analyst il 8 Ago 2023
Modificato: Image Analyst il 8 Ago 2023
Since you have high contrast circles, see my Image Segmentation Tutorial in my File Exchange:
It's a generic, general purpose demo of how to threshold an image to find blobs (high contrast circular coins on a dark uniform background), and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
Get the web cam add-on from the Add-ons button on the tool ribbon.
help webcam
WEBCAM creates webcam object to acquire frames from your webcam. CAMOBJ = WEBCAM returns a webcam object, CAMOBJ, that acquires images from the specified webcam. By default, this selects the first available webcam returned by WEBCAMLIST. CAMOBJ = WEBCAM(DEVICENAME) returns a webcam object, CAMOBJ, for webcam with the specified name, DEVICENAME. The webcam name can be found using the function WEBCAMLIST. CAMOBJ = WEBCAM(DEVICEINDEX) returns a webcam object, CAMOBJ, for webcam with the specified device index, DEVICEINDEX. The webcam device index is the index into the cell array returned by WEBCAMLIST. CAMOBJ = WEBCAM(..., P1, V1, P2, V2,...) constructs the webcam object, CAMOBJ, with the specified property values. If an invalid property name or property value is specified, the webcam object is not created. Creating WEBCAM object obtains exclusive access to the webcam. SNAPSHOT method syntax: IMG = snapshot(CAMOBJ) acquires a single frame from the webcam. [IMG, TIMESTAMP] = snapshot(CAMOBJ) returns the frame, IMG, and the acquisition timestamp, TIMESTAMP. WEBCAM methods: snapshot - Acquire a single frame from the webcam. preview - Activate a live image preview window. closePreview - Close live image preview window. WEBCAM properties: Name - Name of the webcam. Resolution - Resolution of the acquired frame. AvailableResolutions - Cell array of list of available resolutions. The WEBCAM interface also supports the dynamic properties of the webcam that we can access programmatically. Some of these dynamic properties are Brightness, Contrast, Hue, Exposure etc. The presence of these properties in the WEBCAM object depends on the webcam that you connect to. Dynamic properties are not supported when using webcam in MATLAB Online. Example: % Construct a webcam object camObj = webcam; % Preview a stream of image frames. preview(camObj); % Acquire and display a single image frame. img = snapshot(camObj); imshow(img); See also WEBCAMLIST, SNAPSHOT, PREVIEW Documentation for webcam helpwin webcam Other uses of webcam webcam/webcam
  2 Commenti
Jason Choo Chia Sheng
Jason Choo Chia Sheng il 21 Mar 2024
Hi can i check how do we link a parrot minidrone camera for input to feed img into the matlab code?
Vineeth Nair
Vineeth Nair il 22 Mar 2024
You can refer to these examples for image acquisition using the MATLAB Parrot sppkg.

Accedi per commentare.

Categorie

Scopri di più su Computer Vision Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by