MATLAB制作GUI—GUI中图像坐标的获取③(回调函数实现)

发布时间:2024-12-13 08:27

从书中获取的灵感实践于手工制作 #生活乐趣# #日常生活趣事# #手工制作的乐趣# #读书会趣闻#

最新推荐文章于 2024-10-21 21:09:10 发布

等等登登-Ande 于 2019-04-14 12:51:33 发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

今天,将介绍GUI中获取图像坐标的最后一种方法—通过axes坐标轴的回调函数实现坐标的获取。

今天使用的回调函数是axes中的ButtonDownFcn函数,当鼠标在axes中点击时,MATLAB就会调用ButtonDownFcn函数。

下面是该GUI的gif图:

下面贴出实现代码:

function varargout = Getposition3(varargin)

% GETPOSITION3 MATLAB code for Getposition3.fig

% GETPOSITION3, by itself, creates a new GETPOSITION3 or raises the existing

% singleton*.

%

% H = GETPOSITION3 returns the handle to a new GETPOSITION3 or the handle to

% the existing singleton*.

%

% GETPOSITION3('CALLBACK',hObject,eventData,handles,...) calls the local

% function named CALLBACK in GETPOSITION3.M with the given input arguments.

%

% GETPOSITION3('Property','Value',...) creates a new GETPOSITION3 or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before Getposition3_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to Getposition3_OpeningFcn via varargin.

%

% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one

% instance to run (singleton)".

%

% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Getposition3

% Last Modified

网址:MATLAB制作GUI—GUI中图像坐标的获取③(回调函数实现) https://www.yuejiaxmz.com/news/view/461808

相关内容

基于MATLAB语音识别系统GUI界面
Python实现自动操作 GUI
pyautogui — GUI 自动化工具,用于模拟键盘和鼠标事件。
MATLAB图像处理(包括图像类型转换)
基于MATLAB的智能交通信号灯控制系统的实现
新加坡国立大学研究:Claude智能体实现游戏与办公任务自动化,开启GUI智能时代
pyautogui 鼠标键盘自动化 库的中文版
系统设计=基于表面肌电信号的不同手势识别【MATLAB】
【行空板教程】语音识别助手 DF创客社区
掌握这17个Python自动化操作,简化你的日常工作流程,提升工作效率!

随便看看