Image Structure

less than 1 minute read

1.What is the image?

  • The pixel is arraied on 2-dimension matrix which is composed of cross grid

  • Pixel = Basic unit , picture element



2. The expression method of image


  • grayscale image can show 0 ~ 255

  • True color image can show 0 ~ 255^3

  • Numpy.unit8 could express 1Byte of pixel value ex) ( 255)

  • Numpy.ndarray could express 3Byte of pixel value ex) ( 255.255.255) or tuple

  • w x h coordinations is generally used in the image.

3. The size analysis of image data


  • Gray scale image : ( w ) x ( h ) Bytes
  • True color image : ( w ) x ( h ) Bytes



4. The feature of file format


  • BMP : It directly save a file without compression

    ​ : The file structure is simple, so it can program the file I/O without extra library help

  • JPG : It generally saves color images such as photos

    ​ : Lossly compression

    ​ : It is great compression rate and greatly reduces file size

  • GIF : It saves images with 256 colors or less

    ​ : Lossless compression

  • PNG : Portable Network Graphics

    ​ : Lossless compression

Leave a comment