Tool/software:
Hello Ti experts,
I'm using OV5647 camera with AM625 and now I can capture the frames in SBGGR10 format.
For viewing those captured raw frames, I first convert them into 8 bit raw RGB format, and then I'm converting it to .mkv(If video) and .png(If Image)
1. For converting from SBGGR10 to 8 bit raw RGB I've a python script as
import numpy as np # Read the 10-bit raw data with open('capture', 'rb') as f: raw_data = np.fromfile(f, dtype=np.uint16) # Scale the 10-bit data to 8-bit by dividing by 4 (right shift by 2) and applying a brightness factor # Adjust brightness_factor as needed brightness_factor = 15 raw_data_scaled = np.clip((raw_data >> 2) * brightness_factor, 0, 255).astype(np.uint8) # Save the adjusted 8-bit data raw_data_scaled.tofile('video_8bit.raw')
2. And the command to convert the bayer_bgg8 to rgb24 I've used
ffmpeg -f rawvideo -pix_fmt bayer_bggr8 -s 640x480 -i video_8bit.raw -vf format=rgb24 -c:v ffv1 -level 3 test.mkv
So, using this 2 parts I need to do these steps
Please let me know how to automate this process and directly display the camera output on HDMI display in rgb24 format
Best Regards,
Aditya T