MATLAB简单机器人视觉控制(仿真1) 您所在的位置:网站首页 人的视觉形成在哪 MATLAB简单机器人视觉控制(仿真1)

MATLAB简单机器人视觉控制(仿真1)

2024-07-16 21:37| 来源: 网络整理| 查看: 265

 

1、前记:在MATLAB论坛下载了个源码(具体如下),主要功能是利用MATLAB打开摄像头识别红色物体,获取坐标值,然后传给有robotics toolbox 建立的机器人使其模型运动。

2、源码如下:(down下来的代码运行时出错)看别人在YouTube上传的视频没有错啊!

clear all; t3r=[0 1 0 0;0 1 0 0;0 1 0 0]; r3bot=robot(t3r); a = imaqhwinfo; %[camera_name, camera_id, format] = getCameraInfo(a); f1=figure; f2=figure; % Capture the video frames using the videoinput function % You have to replace the resolution & your installed adaptor name. vid = videoinput('winvideo',1); %sls=videoinput('winvideo',1) % Set the properties of the video object set(vid, 'FramesPerTrigger', Inf); set(vid, 'ReturnedColorspace', 'rgb') vid.FrameGrabInterval = 1; %start the video aquisition here start(vid) n=50; % Set a loop that stop after 100 frames of aquisition while(vid.FramesAcquired


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有