79654813

Date: 2025-06-05 15:57:15
Score: 2
Natty:
Report link

The return result from READ_IMAGE.PRO is a 2D array if greyscale and 3D if color (e.g., see https://www.nv5geospatialsoftware.com/docs/READ_IMAGE.html). So yes, if you only want the greyscale image, just use the second two dimensions. To make it a true greyscale image, you can follow the advice in https://stackoverflow.com/a/689547/4005647 to apply proper weights to each of the RGB channels.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: honeste_vivere