SVO color filtering

I would like to open SVO file, perform color filtering on the frames and then save the new SVO file. Is there a way for me to access the individual frames to perform some image filtering and then save them into new SVO file?

Thanks!

Figured out how to extract an image from SVO file using get_data() function which returns a numpy array that can be used as a matrix with openCV.

Here is the code snip of extracting the image and filtering based on HSV color format:

#====================================================================
# hsv hue sat val
lower_green = np.array([35,63,76]) # H,S,V
upper_green = np.array([88,192,243])# H,S,V
#====================================================================

image_ocv = image.get_data() # Returns a numpy array that can be used as a matrix with opencv
hsv = cv2.cvtColor(image_ocv, cv2.COLOR_BGR2HSV)
mask = cv2.inRange(hsv, lower_green, upper_green) # H: [0,179], S: [0,255], V: [0,255]
res = cv2.bitwise_and(image_ocv, image_ocv, mask = mask)

        cv2.imshow('image_ocv',image_ocv)
        cv2.imshow('result',res)

Still the question is, can I use the filtered image frames to write a new SVO file? Basically can I convert the new image somehow back into the sl.Mat() format to write a SVO file.

Cheers!