A device for raw image data compression for a vehicle, characterized by the device comprising: - a data rearranging module, which is configured to rearrange image data captured from a camera in form of a raw Bayer format of 12-bit depth pattern input data into YUV420 12-bit depth pattern rearranged data, the 12-bit depth pattern rearranged data comprising i) at least one Y-channel containing collated green, red and blue components of the 12-bit depth pattern input data;ii) at least one U-channel and at least one V-channel containing at least one blank image filled with zeros; and wherein a resolution of the at least one Y-channel corresponds to a resolution of the 12-bit depth pattern input data, - a data splitting module, which is configured to split the 12-bit depth pattern rearranged data received from the data rearranging module into an YUV420 format with 8-bit depth pattern of least significant bits, LSB, data and an 8-bit depth pattern of most significant bits, MSB, data, wherein the 8-bit depth pattern of the LSB data comprises the lower 8-bits of the 12-bit depth pattern rearranged data, wherein the 8-bit depth pattern of the MSB data comprises the higher 4-bits of the 12-bit depth pattern rearranged data as the lower 4-bits of the MSB data and the higher 4-bits of the MSB data are filled with zeros, wherein the 8-bit data are stored in the Y-channel of an 8-bit image where the YUV420 sampling format is maintained, and the Y, U and V components have doubled vertical resolution; and - wherein the device is configured to compress the YUV420 formatted 8-bit data obtained from the data splitting module using standard codecs. - a data rearranging module, which is configured to rearrange image data captured from a camera in form of a raw Bayer format of 12-bit depth pattern input data into YUV420 12-bit depth pattern rearranged data, the 12-bit depth pattern rearranged data comprising i) at least one Y-channel containing collated green, red and blue components of the 12-bit depth pattern input data;ii) at least one U-channel and at least one V-channel containing at least one blank image filled with zeros; and wherein a resolution of the at least one Y-channel corresponds to a resolution of the 12-bit depth pattern input data, - a data splitting module, which is configured to split the 12-bit depth pattern rearranged data received from the data rearranging module into an YUV420 format with 8-bit depth pattern of least significant bits, LSB, data and an 8-bit depth pattern of most significant bits, MSB, data, wherein the 8-bit depth pattern of the LSB data comprises the lower 8-bits of the 12-bit depth pattern rearranged data, wherein the 8-bit depth pattern of the MSB data comprises the higher 4-bits of the 12-bit depth pattern rearranged data as the lower 4-bits of the MSB data and the higher 4-bits of the MSB data are filled with zeros, wherein the 8-bit data are stored in the Y-channel of an 8-bit image where the YUV420 sampling format is maintained, and the Y, U and V components have doubled vertical resolution; and wherein the 8-bit depth pattern of the LSB data comprises the lower 8-bits of the 12-bit depth pattern rearranged data, wherein the 8-bit depth pattern of the MSB data comprises the higher 4-bits of the 12-bit depth pattern rearranged data as the lower 4-bits of the MSB data and the higher 4-bits of the MSB data are filled with zeros, wherein the 8-bit data are stored in the Y-channel of an 8-bit image where the YUV420 sampling format is maintained, and the Y, U and V components have doubled vertical resolution; and - wherein the device is configured to compress the YUV420 formatted 8-bit data obtained from the data splitting module using standard codecs.