Image Watch插件學習筆記

VS插件,可以方便調試,觀察圖像!!!


local模式和watch模式
local模式:只讀模式 the Image List (B) gets automatically populated with all image-valued variables that are on the current stack frame.
 Watch 模式,可以添加  image items are added manually by the user, e.g. by typing in image-valued expressions
可以移動和放大
可以編輯, Expressions can be cut (Ctrl+X, Ctrl+Delete), copied (Ctrl+C, Ctrl+Insert), and pasted (Ctrl+V, Shift+Insert),




Image watch支持的通道類型:
·         INT8, UINT8

·         INT16, UINT16

·         INT32

·         FLOAT16

·         FLOAT32

·         FLOAT64

也支持特殊的YUV格式:
  • NV12 (two planes: one Y plane, one packed UV plane, subsampled by 2 in both dimensions)
  • YV12 (three planes: one Y plane, one packed U and V plane each, both subsampled by 2 in both dimensions)
  • IYUV (same as YV12 but with U and V planes switched)
  • YUY2 (single plane, interleaved two-channel format: Y in the first channel; U and V subsampled by 2 horizontally and stored alternating in the second channel)
Image Watch還支持一系列簡單的操作符,以@開始
一定是在watch模式下!
  1. @band(img, number): extract channel number  (UINT32) from img.  
  2. 提取某一通道

  3. @thresh(img, threshold): threshold pixels in img: return 1 if >= threshold (FLOAT32) and 0 otherwise
  4. 閾值化操作

  5. @clamp(img, min, max): clamp pixel values in img to lie between min (FLOAT32) and max (FLOAT32).限制圖像的範圍在(min,max)之間

  6.  @abs(img): take absolute value of pixels in img
  7. 求絕對值

  8. @scale(img, factor): scale pixel values in img by factor (FLOAT32)
  9. 對圖像進行縮放

  10. @norm8(img): scale pixels values in img by 1/255
  11. 所有圖像像素乘以1/255縮放

  12. @norm16(img): scale pixels values in img by 1/65535
  13. 所有圖像像素乘以1/65535縮放

  14. @fliph(img), @flipv(img), @flipd(img): flip img horizontally, vertically, and diagonally (matrix transpose), respectively.
  15. 水平(h)、垂直(v)或翻轉或者圖像轉置(d)

  16. @rot90(img), @rot180(img), @rot270(img): rotate img by 90, 180, 270 degrees clockwise, respectively. 
  17. 圖像旋轉

  18. @diff(img0, img1): return pixel-wise difference: img0 – img1
  19. 基於像素的差分

  20. @file(path): load image from path (string). Example: @file(“d:\temp\debug.png”) 
  21. 加載圖像

  22. @mem(address, type, channels, width, height, stride): interpret raw memory as pixels, starting at address (UINT64), (UINT32). Example: @mem(myimg.data, UINT8, 1, 320, 240, 320) @mem(0x00000000003d1050,UINT8, 3, 256, 256, 768 );
  23. 將指定地址的內存數據轉爲圖像像素信息顯示
發佈了18 篇原創文章 · 獲贊 19 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章