A method comprising: recording, by a camera of a vehicle , an image (200; 510) having a plurality of pixels; receiving , by a processor of the vehicle, the image (200; 510), wherein the image is included in a sequence of images, wherein a global importance value is assigned to the image; determining , by the processor of the vehicle, a region of interest (301A; 301B) within the image, wherein the region of interest is defined by an importance matrix (400; 400A; 400B), wherein each of the plurality of pixels of the image has a corresponding importance value of the importance matrix; prior to encoding the image, filtering , by the processor of the vehicle, the image to generate a filtered image (300A; 300B; 530) with reduced information content, wherein the filtering comprises reducing the information content of the image by filtering pixels (302A; 302B) of the image outside the region of interest, wherein the pixels of the image outside the region of interest are filtered based on a combination of the importance values of the importance matrix and the global importance value, wherein the global importance value depends on additional sensor data, and wherein the additional sensor data comprises data from an accelerometer, a break and/or a speed of the vehicle; and encoding , by the processor of the vehicle, the filtered image by an encoder. recording, by a camera of a vehicle , an image (200; 510) having a plurality of pixels; receiving , by a processor of the vehicle, the image (200; 510), wherein the image is included in a sequence of images, wherein a global importance value is assigned to the image; determining , by the processor of the vehicle, a region of interest (301A; 301B) within the image, wherein the region of interest is defined by an importance matrix (400; 400A; 400B), wherein each of the plurality of pixels of the image has a corresponding importance value of the importance matrix; prior to encoding the image, filtering , by the processor of the vehicle, the image to generate a filtered image (300A; 300B; 530) with reduced information content, wherein the filtering comprises reducing the information content of the image by filtering pixels (302A; 302B) of the image outside the region of interest, wherein the pixels of the image outside the region of interest are filtered based on a combination of the importance values of the importance matrix and the global importance value, wherein the global importance value depends on additional sensor data, and wherein the additional sensor data comprises data from an accelerometer, a break and/or a speed of the vehicle; and wherein the filtering comprises reducing the information content of the image by filtering pixels (302A; 302B) of the image outside the region of interest, wherein the pixels of the image outside the region of interest are filtered based on a combination of the importance values of the importance matrix and the global importance value, wherein the global importance value depends on additional sensor data, and wherein the additional sensor data comprises data from an accelerometer, a break and/or a speed of the vehicle; and encoding , by the processor of the vehicle, the filtered image by an encoder. <EOS>