擅长:python、mysql、java
<p>以下是应该如何完成:</p>
<pre><code>### Set Pixel Format to RGB8 ###
node_pixel_format =
PySpin.CEnumerationPtr(nodemap.GetNode('PixelFormat'))
if not PySpin.IsAvailable(node_pixel_format) or not PySpn.IsWritable(node_pixel_format):
print('Unable to set Pixel Format to RGB8 (enum retrieval). Aborting...')
node_pixel_format_RGB8 = node_pixel_format.GetEntryByName('RGB8')
if not PySpin.IsAvailable(node_pixel_format_RGB8) or not PySpin.IsReadable(node_pixel_format_RGB8):
print('Unable to set Pixel Format to RGB8 (entry retrieval). Aborting...')
pixel_format_RGB8 = node_pixel_format_RGB8.GetValue()
node_pixel_format.SetIntValue(pixel_format_RGB8)
</code></pre>