필터 지우기
필터 지우기

circle detection from drones camera

조회 수: 3 (최근 30일)
ugonna
ugonna 2023년 8월 8일
댓글: Vineeth Nair 2024년 3월 22일
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
Image Analyst
Image Analyst 2023년 8월 8일
편집: Image Analyst 2023년 8월 8일
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 2023년 8월 8일
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

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

답변 (1개)

Image Analyst
Image Analyst 2023년 8월 8일
편집: Image Analyst 2023년 8월 8일
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
Jason Choo Chia Sheng
Jason Choo Chia Sheng 2024년 3월 21일
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 2024년 3월 22일
You can refer to these examples for image acquisition using the MATLAB Parrot sppkg.

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

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Parrot Drones에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by