1. 程式人生 > >MATLAB中mesh函數的使用:基於像素強度畫3D密度圖(create a 3D density plot based on the pixel intensity:mesh function)

MATLAB中mesh函數的使用:基於像素強度畫3D密度圖(create a 3D density plot based on the pixel intensity:mesh function)

ase tps splay 示例 width bubuko pre pos 簡單

所用的函數非常簡單,只需要用到mesh函數,示例代碼如下:

Ima=imread(‘F:\pathto\test.jpg‘);
surf_ima = surf(rgb2gray(Ima)); %黑色的3D圖
title(‘3D‘)
mesh_ima = mesh(rgb2gray(Ima)); %有色彩的3D圖

  技術分享圖片

技術分享圖片

技術分享圖片

參考鏈接:https://cn.mathworks.com/matlabcentral/answers/17998-image-processing-how-can-i-create-a-3d-density-plot-based-on-the-pixel-intensity

MATLAB中mesh函數的使用:基於像素強度畫3D密度圖(create a 3D density plot based on the pixel intensity:mesh function)