擅长:python、mysql、java
<p>从Image.open打开()</p>
<blockquote>
<p>This is a lazy operation; this function identifies the file, but the file remains open and the actual image data is not read from the file until you try to process the data</p>
</blockquote>
<p>此函数返回图像对象。一旦你打电话给<strong>即时消息关闭()</strong>,它关闭文件指针,因此无法访问图像。你知道吗</p>
<p>我们可以使用cv2或matplotlib读取图像并将其存储在列表中。你知道吗</p>
<pre><code> im = cv2.imread(filename)
# im will be a numpy array
image_list.append(im)
</code></pre>