資源簡介
matlab GUI實(shí)時點(diǎn)擊可以獲取坐標(biāo)值
代碼片段和文件信息
%?Author:?ilovehust
function?CrossImage?=?DrawCross(Image?point_x?point_y?Length?Width?Color)
CrossImage?=?Image;
[rowcol?channel]?=?size(Image);
old_point_x?=?point_x;
old_point_y?=?point_y;
Xoffset?=?floor(Width?/?2);
Yoffset?=?floor(Width?/?2);
for?i?=?-Xoffset?:?Xoffset
????for?j?=?-Yoffset?:?Yoffset
????????point_x?=?old_point_x?+?i;
????????point_y?=?old_point_y?+?j;
????????if(point_y?>=?Length)
????????????start_y?=?point_y?-?Length;
????????else
????????????start_y?=?1;
????????end
????????if(point_y?<=?(row?-?Length))
????????????end_y?=?point_y?+?Length;
????????else
????????????end_y?=?row;
????????end
????????if(point_x?>=?Length)
????????????start_x?=?point_x?-?Length;
????????else
????????????start_x?=?1;
????????end
????????if(point_x?<=?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1329??2009-12-30?21:26??DrawCross.m
?????文件????????2343??2009-12-30?21:56??Drawfr
?????文件???????66481??2003-11-01?03:54??image.jpg
?????文件???????22898??2017-04-29?11:12??MouseClickDrawfr
?????文件????????7634??2017-04-29?14:58??MouseClickDrawfr
評論
共有 條評論