『問題』有時比『答案』有趣乎?祇因『懸疑』未決耶!
所謂『玩科技』自得其樂者也☆
pi@raspberrypi:~/test ipython3 Python 3.4.2 (default, Oct 19 2014, 13:31:11) Type "copyright", "credits" or "license" for more information. IPython 2.3.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import picamera In [2]: import numpy as np In [3]: import matplotlib.pyplot as plt In [4]: 相機 = picamera.PiCamera() In [5]: 相機.resolution = (320, 240) In [6]: RGB空矩陣 = np.empty((240, 320, 3), dtype=np.uint8) In [7]: 相機.capture(RGB空矩陣, 'rgb') In [8]: type(RGB空矩陣) Out[8]: numpy.ndarray In [9]: RGB空矩陣.shape Out[9]: (240, 320, 3) In [10]: plt.imshow(RGB空矩陣) Out[10]: <matplotlib.image.AxesImage at 0x6e023a50> In [11]: plt.show() In [12]: