Closed Circle-Kai closed 3 years ago
Hi, @Circle-Kai !
Your camera has RGB color sensor, right? The spots you are talking about is probably caused by the color filter array. EasyPySpin returns the bayer pattern image (like the second one). So, you need to do demosaicing after capturing the image. Try the code below.
import cv2
import EasyPySpin
cap = EasyPySpin.VideoCapture(0)
ret, frame = cap.read()
frame_bgr = cv2.demosaicing(frame, cv2.COLOR_BayerBG2BGR) # The second argument may need to be changed depending on your sensor.
cv2.imwrite("frame_bgr.png", frame_bgr)
Because I want to get grayscale images, I use image. Convert() to convert images . I added this code before GetNDArray().
image_converted = image.Convert(PySpin.PixelFormat_Mono8, PySpin.HQ_LINEAR)
If there is an error, please tell me again, thanks
Did you solve it? That sounds like a good idea too. I'm glad if you solved it.
Yes, it has been resolved. Thank you.
Thank you for providing this package. The images saved in the SDK are normal, but spots appear when using EasyPySpin. What parameters can I adjust to improve this problem?
You can see some spots above the image.