meshCanopy

버전 1.0.0.0 (2.66 KB) 작성자: Sean de
Display a mesh above a grayscale image
다운로드 수: 2.2K
업데이트 날짜: 2010/11/22

라이선스 보기

This function makes it easy to display a mesh directly above a grayscale image. The mesh can use any colormap and can be at variable heights above the image. The example, which requires the IPT, is the screenshot.

help meshCanopy
function meshCanopy: display a mesh above a grayscale image
SCd 11/18/2010

Updates:
-11/22/2010: Added example (requires IPT)
Added height input argument

Input Arguments:
-I: 2-dimensional grayscale image slice. The values are expected to
range from 0 to 255. If the maximum value is greater than 255 or
the minimum value is less than 0, it will be scaled to 0:255. Else
it will remain unchanged.
-Mdata: 2-dimensional mesh data (Z for a meshplot).
NOTE: the mesh command will be called with:
>>[ii jj] = meshgrid(ceil(cumsum(diff([0 linspace(1,size(I,2),size(Mdata,2))]))),ceil(cumsum(diff([0 linspace(1,size(I,1),size(Mdata,1))]))));
>>mesh(ii,jj,Mdata);
and thus does not need to be the same size as the image!
-Mmap: string, function_handle or nx3, mesh color map. See:
>>doc colormap
for valid options. The argument is optional and defaults to 'jet'
Examples: 'jet', @jet, [0 0 1; 0.5 0;.1 .1 .1]
-height: scalar height of the mesh above the image so you can see both.
Optional defaults to 80.

Output Arguments:
-None!

Example: (Requires the Image Processing Toolbox)
%Display a Mesh Canopy of a standard deviation image, above the original image
I = imread('cameraman.tif');
M = stdfilt(I);
meshCanopy(I,M,@spring)

See also: mesh colormap

인용 양식

Sean de (2024). meshCanopy (https://www.mathworks.com/matlabcentral/fileexchange/29485-meshcanopy), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2009b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0