Compute visible area of partically obscured object of 3D figure

3 vues (au cours des 30 derniers jours)
viet le
viet le le 28 Août 2016
Modifié(e) : viet le le 18 Sep 2016

Réponse acceptée

Image Analyst
Image Analyst le 28 Août 2016
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 commentaires
Image Analyst
Image Analyst le 29 Août 2016
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.
viet le
viet le le 31 Août 2016
Thanks a lot.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by