[問題] 從圖片中擷取一個橢圓

看板MATLAB作者 (超級都可以)時間9年前 (2015/12/24 23:55), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
想請問板上神人 小弟我想要在一張圖片中擷取出來一個橢圓形,原本構想如下 theta=0:pi/20:2*pi; alpha=pi/4; l=30; w=20; x0=100; y0=80; x3=x0+l*cos(alpha)*cos(theta)-w*sin(alpha)*sin(theta); y3=y0+l*sin(alpha)*cos(theta)+w*cos(alpha)*sin(theta); img(x3,y3,1:3) 其中x0 y0 是橢圓重心 不過發現這個方法不行,想請問有何方法,實在是想很久都想不到辦法 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 119.77.178.47 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1450972531.A.D17.html
文章代碼(AID): #1MV1LpqN (MATLAB)
文章代碼(AID): #1MV1LpqN (MATLAB)