abelperezd / AVES_P1

Lab 1 of the video part of the Audio and Video Encoding Systems subject, done in the fourth year. We find operations performed in FFmpeg through Python scripts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repository information

In this repository we find the delivery of the Lab 1 of the Audio and Video Encoding Systems subject (video part).

We have 5 .py files and in each of them we find a detailed explanation on how to use them, but in general they do the following:

  • [1] rgb_yuv.py: convert 3 RGB values to YUV and vice versa.
  • [2] ex2and3.py: crop an image and convert the result to a new grayscale image (using FFMPEG).
  • [3] ex3_v2.py: convert a color image to black and white (using FFMPEG).
  • [4] ex4.py: apply run-lenght to an alphanumeric sequence.
  • [5] ex5.py: apply DFT and IDFT to an image and compare the obtained result with the original image.

Results obtained

In the sections where we needed a reference image, the one used was the following:

[2]

Once we run this script, the results obtained are the following two images:

In the first case, since we went from a 2000x2000 image to a 200x200 image, we obtain a great size reduction (from 336.6 kB to 7.3 kB).

For the second case, we go from the color image to grayscale. Taking into account that the format we use is JPEG, we also get a reduction in file size (from 7.3 kB to 6.2 kB). In case of using other output formats, we could obtain images with a better compression.

[3]

In this case, we directly apply the black and white conversion of the original image. We obtain also an image of smaller size (282 kB).

[5]

After executing this script, we obtain on screen the comparison between the two images. At first sight we do not observe any difference (the input image is exactly the same as the output image, without any loss).

About

Lab 1 of the video part of the Audio and Video Encoding Systems subject, done in the fourth year. We find operations performed in FFmpeg through Python scripts.


Languages

Language:Python 100.0%