Compute visible area of partically obscured object of 3D figure

조회 수: 2 (최근 30일)
viet le
viet le 2016년 8월 28일
편집: viet le 2016년 9월 18일

채택된 답변

Image Analyst
Image Analyst 2016년 8월 28일
It would take a lot of complicated geometrical equations. Or you could get an approximation by saving the rendering you have to an image with export_fig(), and then counting up the red pixels.
  댓글 수: 3
Image Analyst
Image Analyst 2016년 8월 29일
Something like
rgbImage = getframe();
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
redPixels = redChannel == 255 & greenChannel == 0 & blueChannel = 0;
redArea = sum(redPixels(:));
But this only gets you the area in pixels on your screen, which is not necessarily the area in the units of your axes. You would have to do a spatial calibration to turn pixels on the screen into the units of your axes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by