mercredi 5 août 2015

How to convert a jpg tp yuv in C?


Even though a question of this nature sounds very similar, I am having problems in converting a jpg image to yuv in C (without using opencv).

This is what I have understood as of now, how to solve this problem :

  1. Identify the structure of file formats for jpg and yuv. i.e what each byte in the file actually contains. This is what I think jpg format looks like.
  2. With the above structure I tried to read a jpg file and tried to decipher its 18th and 19th bytes. I did type cast them to both char and int but I don`t get any meaningful values for width and height of the image.
  3. Once I have read these values, I should be able to convert them from jpg to yuv. I was looking at this resource.

  4. Appropriately, construct yuv image and write it to a (.yuv) file.

Kindly help me by pointing me to appropriate resources. I will keep updating my progress on this post. Thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire