Create a cvb.Image object from a numpy array

Hi @JRo85 !
Yes it is! Just try the following:

import numpy as np
import cvb
any_array = np.ones([2,2]) # 2x2 image of ones
cvb_image = cvb.WrappedImage.from_buffer(any_array)
# continue with cvb_image

Hope this helps. For fruther guidance you could look at Getting-Started-With-CVBpy

2 Likes