2d gaussian function

조회 수: 5 (최근 30일)
Lucy Sharpe
Lucy Sharpe 2021년 2월 25일
답변: Mathieu NOE 2021년 2월 26일
I'm trying to create a plot of a 2d gaussian from information from a depth camera. But the depth values come out as a 1x407040 matrix instead of 848x480 pixels as the camera is set to. How do I go about creating this plot?

답변 (1개)

Mathieu NOE
Mathieu NOE 2021년 2월 26일
hello Lucy
assuming your values are stored in A vector, use reshape to get the 848x480 pixels in matrix B :
B = reshape(A,848,480);
then you can use any of the 2D plot commands , like
imagesc(B)

카테고리

Help CenterFile Exchange에서 Camera Views에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by