i have a Flir A615 camera and im getting data from it with this code:
image_result = cam.GetNextImage()
image_data = image_result.GetNDArray()
then to show im using matplotlib
plt.imshow(image_data, cmap='afmhot')
but i cant use it on opencv like
cv2.imshow("frame",image_data)
some one know how to convert the PySpin.Image
to Opencv
format?
The PySpin image.GetNDArray method converts and returns the image to a numpy array. In this answer you can find the conversion rules for numpy -> opencv format: Converting Numpy Array to OpenCV Array