精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • Matlab中g(shù)etframe函數(shù)的用法

    Matlab中g(shù)etframe函數(shù)的用法
    比如這句 F = getframe(2,[85,58,20,20]);這句中的各個(gè)數(shù)字表示什么意思,忘知道的大俠解答下,感激不盡!
    其他人氣:454 ℃時(shí)間:2020-02-05 05:40:33
    優(yōu)質(zhì)解答
    matlab help:
    F = getframe(h,rect) specifies
    a rectangular area from which to copy the pixmap.rect is
    relative to the lower left corner of the figure or axes h,
    in pixel units.rect is a four-element vector in the form [left
    bottom width height],where width and height define
    the dimensions of the rectangle.
    本函數(shù)是要從圖形對象中截取一塊出來.其中h是圖像句柄,rect是一個(gè)四元素向量,代表[a b c d],其中a表示截取區(qū)域到圖像左端的像素?cái)?shù),b表示截取區(qū)域到圖像底端的像素?cái)?shù),c表示截取區(qū)域水平像素?cái)?shù),d表示截取區(qū)域垂直向像素?cái)?shù).
    得到的F是一個(gè)結(jié)構(gòu)體(struct),包含兩個(gè)元素:cdata和colormap,其中cdata是截取區(qū)域的數(shù)據(jù),是一個(gè)三維數(shù)組,其中第三維的長度是3,即截取到的是區(qū)域中RGB的值.colormap是調(diào)色板,這個(gè)沒啥意思.
    F = getframe(2,[85,58,20,20]),顯然 F.cdata 是一個(gè) 20*20*3的數(shù)組.
    嘗試以下代碼:
    Z = peaks; surf(Z);
    F = getframe(gcf,[150 150 100 100]);
    figure,imshow(F.cdata);
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版