AbdoKamel / simple-camera-pipeline

A simple and light-weight camera image processing pipeline
MIT License
316 stars 51 forks source link

.mat image shape #10

Open moon5ye opened 3 years ago

moon5ye commented 3 years ago

I use python h5py to read .mat files. But why the image shape is not the same as the correspoinding rgb image?

Also, I checked the python demo. Is there any python implementation of ISP that can convert these .mat files to rgb images?

AbdoKamel commented 3 years ago

The difference in image shape could be due to the sensor cropping area. This feature is not currently in the python version of the pipeline. Here is the equivalent in matlab: https://github.com/AbdoKamel/simple-camera-pipeline/blob/4f34a9aa5f406ba4adce3b0bb7ea11513f13e943/matlab/run_pipeline.m#L30

The python pipeline works with DNGs for now. You can modify the code a little to read the image from the .mat file and the metadata from the corresponding metadata file, instead for reading both from a DNG file.

I will try to include those feature in the python pipeline in the future.