{
  "id": 150596,
  "title": "JPEG Quality Factor",
  "url": "/competitions/alaska2-image-steganalysis/discussion/150596",
  "author_name": "",
  "post_date": "2020-05-12T18:54:31.753560500Z",
  "votes": 4,
  "comment_count": 4,
  "views": 0,
  "content": "<p>It's the first time I'm working with JPEG compression metadata, so I'm trying to understand the the images in a bit more detail. In the dataset description, we say that three quality factors are used, 75, 90 and 95. It's unclear to me what is a 'quality factor' when expressed as a integer. I thought that JPEG 'quality' is based on the quantization matrix. Is the quality factor integer used to generate a quantization matrix? How?</p>",
  "messages": [
    {
      "id": "844667",
      "postDate": "05/12/2020 18:54:31",
      "content": "<p>It's the first time I'm working with JPEG compression metadata, so I'm trying to understand the the images in a bit more detail. In the dataset description, we say that three quality factors are used, 75, 90 and 95. It's unclear to me what is a 'quality factor' when expressed as a integer. I thought that JPEG 'quality' is based on the quantization matrix. Is the quality factor integer used to generate a quantization matrix? How?</p>",
      "rawMarkdown": "It's the first time I'm working with JPEG compression metadata, so I'm trying to understand the the images in a bit more detail. In the dataset description, we say that three quality factors are used, 75, 90 and 95. It's unclear to me what is a 'quality factor' when expressed as a integer. I thought that JPEG 'quality' is based on the quantization matrix. Is the quality factor integer used to generate a quantization matrix? How?",
      "votes": null
    },
    {
      "id": "844734",
      "postDate": "05/12/2020 19:59:31",
      "content": "<p>Hello there,</p>\n\n<p>Alex, I tried to (briefly) answer your question at the end of this notebook : \n<a href=\"https://www.kaggle.com/remicogranne/jpeg-explanations\">https://www.kaggle.com/remicogranne/jpeg-explanations</a></p>\n\n<p>There, you can see ow to decompress a JPEG file and what how the quality factor is involved in this process (and what it does)</p>\n\n<p>Do not hestiate if you have any question</p>",
      "rawMarkdown": "Hello there,\n\nAlex, I tried to (briefly) answer your question at the end of this notebook : \n[https://www.kaggle.com/remicogranne/jpeg-explanations](https://www.kaggle.com/remicogranne/jpeg-explanations)\n\nThere, you can see ow to decompress a JPEG file and what how the quality factor is involved in this process (and what it does)\n\nDo not hestiate if you have any question",
      "votes": null
    },
    {
      "id": "844768",
      "postDate": "05/12/2020 20:35:27",
      "content": "<p>Thanks Rémi. I see in your Notebook you're creating quantization matrices based on some matrices you've defined in variables 'table0' and 'table1'. How were the values in these matrices determined? Is this an arbitrary choice or are you following some published convention (that is, to map: quality factor integer -&gt; quantization matrix)?</p>",
      "rawMarkdown": "Thanks Rémi. I see in your Notebook you're creating quantization matrices based on some matrices you've defined in variables 'table0' and 'table1'. How were the values in these matrices determined? Is this an arbitrary choice or are you following some published convention (that is, to map: quality factor integer -&gt; quantization matrix)?",
      "votes": null
    },
    {
      "id": "845175",
      "postDate": "05/13/2020 04:56:52",
      "content": "<p>Hello Alex,</p>\n\n<p>Yes and No. The creation of those matrix is only for \"explanation\" purpose, in order to explain how those tables are created from the standard matrix (which have bee defined in JPEG standard).\nHowever, when dealing with images I used the tables which are part of the JPEG metadata <code>jpegStruct.quant_tables</code></p>\n\n<p>So in brief, JPEG standard proposes some way to get those tables / matrix but also offers the flexibility to define your own matrix (some camera manufacturer as well as adobe does so)</p>",
      "rawMarkdown": "Hello Alex,\n\nYes and No. The creation of those matrix is only for \"explanation\" purpose, in order to explain how those tables are created from the standard matrix (which have bee defined in JPEG standard).\nHowever, when dealing with images I used the tables which are part of the JPEG metadata `jpegStruct.quant_tables`\n\nSo in brief, JPEG standard proposes some way to get those tables / matrix but also offers the flexibility to define your own matrix (some camera manufacturer as well as adobe does so)",
      "votes": null
    },
    {
      "id": "846308",
      "postDate": "05/13/2020 17:14:53",
      "content": "<p>I found this paper by a familiar author: <a href=\"https://www.researchgate.net/publication/322950128_Determining_JPEG_Image_Standard_Quality_Factor_from_the_Quantization_Tables\">https://www.researchgate.net/publication/322950128_Determining_JPEG_Image_Standard_Quality_Factor_from_the_Quantization_Tables</a></p>\n\n<p>Thank you <a href=\"/remicogranne\">@remicogranne</a> for making it freely available!</p>",
      "rawMarkdown": "I found this paper by a familiar author: https://www.researchgate.net/publication/322950128_Determining_JPEG_Image_Standard_Quality_Factor_from_the_Quantization_Tables\n\nThank you @remicogranne for making it freely available!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 844734,
      "author_name": "remicogranne",
      "author_url": "",
      "post_date": "05/12/2020 19:59:31",
      "content": "<p>Hello there,</p>\n\n<p>Alex, I tried to (briefly) answer your question at the end of this notebook : \n<a href=\"https://www.kaggle.com/remicogranne/jpeg-explanations\">https://www.kaggle.com/remicogranne/jpeg-explanations</a></p>\n\n<p>There, you can see ow to decompress a JPEG file and what how the quality factor is involved in this process (and what it does)</p>\n\n<p>Do not hestiate if you have any question</p>",
      "votes": null,
      "replies": [
        {
          "id": 844768,
          "author_name": "apeplowski",
          "author_url": "",
          "post_date": "05/12/2020 20:35:27",
          "content": "<p>Thanks Rémi. I see in your Notebook you're creating quantization matrices based on some matrices you've defined in variables 'table0' and 'table1'. How were the values in these matrices determined? Is this an arbitrary choice or are you following some published convention (that is, to map: quality factor integer -&gt; quantization matrix)?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 845175,
          "author_name": "remicogranne",
          "author_url": "",
          "post_date": "05/13/2020 04:56:52",
          "content": "<p>Hello Alex,</p>\n\n<p>Yes and No. The creation of those matrix is only for \"explanation\" purpose, in order to explain how those tables are created from the standard matrix (which have bee defined in JPEG standard).\nHowever, when dealing with images I used the tables which are part of the JPEG metadata <code>jpegStruct.quant_tables</code></p>\n\n<p>So in brief, JPEG standard proposes some way to get those tables / matrix but also offers the flexibility to define your own matrix (some camera manufacturer as well as adobe does so)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 846308,
      "author_name": "anjum48",
      "author_url": "",
      "post_date": "05/13/2020 17:14:53",
      "content": "<p>I found this paper by a familiar author: <a href=\"https://www.researchgate.net/publication/322950128_Determining_JPEG_Image_Standard_Quality_Factor_from_the_Quantization_Tables\">https://www.researchgate.net/publication/322950128_Determining_JPEG_Image_Standard_Quality_Factor_from_the_Quantization_Tables</a></p>\n\n<p>Thank you <a href=\"/remicogranne\">@remicogranne</a> for making it freely available!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "844667": "It's the first time I'm working with JPEG compression metadata, so I'm trying to understand the the images in a bit more detail. In the dataset description, we say that three quality factors are used, 75, 90 and 95. It's unclear to me what is a 'quality factor' when expressed as a integer. I thought that JPEG 'quality' is based on the quantization matrix. Is the quality factor integer used to generate a quantization matrix? How?",
    "844734": "Hello there,\n\nAlex, I tried to (briefly) answer your question at the end of this notebook : \n[https://www.kaggle.com/remicogranne/jpeg-explanations](https://www.kaggle.com/remicogranne/jpeg-explanations)\n\nThere, you can see ow to decompress a JPEG file and what how the quality factor is involved in this process (and what it does)\n\nDo not hestiate if you have any question",
    "844768": "Thanks Rémi. I see in your Notebook you're creating quantization matrices based on some matrices you've defined in variables 'table0' and 'table1'. How were the values in these matrices determined? Is this an arbitrary choice or are you following some published convention (that is, to map: quality factor integer -&gt; quantization matrix)?",
    "845175": "Hello Alex,\n\nYes and No. The creation of those matrix is only for \"explanation\" purpose, in order to explain how those tables are created from the standard matrix (which have bee defined in JPEG standard).\nHowever, when dealing with images I used the tables which are part of the JPEG metadata `jpegStruct.quant_tables`\n\nSo in brief, JPEG standard proposes some way to get those tables / matrix but also offers the flexibility to define your own matrix (some camera manufacturer as well as adobe does so)",
    "846308": "I found this paper by a familiar author: https://www.researchgate.net/publication/322950128_Determining_JPEG_Image_Standard_Quality_Factor_from_the_Quantization_Tables\n\nThank you @remicogranne for making it freely available!"
  },
  "source": "meta"
}