{
  "id": 454105,
  "title": "About image 'depth'",
  "url": "/competitions/blood-vessel-segmentation/discussion/454105",
  "author_name": "",
  "post_date": "2023-11-08T23:49:47.235786200Z",
  "votes": 15,
  "comment_count": 3,
  "views": 0,
  "content": "<p> Edit: The images in this competition are 16 bit.</p>\n<p>Even though we can only see 8 bits of grayscale on our consumer grade monitors, we can observe that the pixel range in this image is <em>18,745</em> to <em>48,094</em>. The distribution is interesting.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4945934%2F5f6b550e5ec0b4b029a2efa5de128259%2FCapture.JPG?generation=1699487716747489&amp;alt=media\" alt=\"\"></p>\n<p>Selectively normalizing certain pixel ranges will help to separate vessel walls from the surrounding tissue and from the blood within them. Tissue types could possibly be thresholded.</p>\n<ul>\n<li>Note - use the <strong>IMREAD_ANYDEPTH</strong> flag with cv2.imread() to maintain the bit depth.</li>\n</ul>\n<pre><code>cv2.imread(, cv2.IMREAD_ANYDEPTH)\n</code></pre>",
  "messages": [
    {
      "id": "2517982",
      "postDate": "11/08/2023 23:49:47",
      "content": "<p> Edit: The images in this competition are 16 bit.</p>\n<p>Even though we can only see 8 bits of grayscale on our consumer grade monitors, we can observe that the pixel range in this image is <em>18,745</em> to <em>48,094</em>. The distribution is interesting.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4945934%2F5f6b550e5ec0b4b029a2efa5de128259%2FCapture.JPG?generation=1699487716747489&amp;alt=media\" alt=\"\"></p>\n<p>Selectively normalizing certain pixel ranges will help to separate vessel walls from the surrounding tissue and from the blood within them. Tissue types could possibly be thresholded.</p>\n<ul>\n<li>Note - use the <strong>IMREAD_ANYDEPTH</strong> flag with cv2.imread() to maintain the bit depth.</li>\n</ul>\n<pre><code>cv2.imread(, cv2.IMREAD_ANYDEPTH)\n</code></pre>",
      "rawMarkdown": "~~The images in this competition are 24 bit.~~ Edit: The images in this competition are 16 bit.\n\nEven though we can only see 8 bits of grayscale on our consumer grade monitors, we can observe that the pixel range in this image is *18,745* to *48,094*. The distribution is interesting.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4945934%2F5f6b550e5ec0b4b029a2efa5de128259%2FCapture.JPG?generation=1699487716747489&alt=media)\n\nSelectively normalizing certain pixel ranges will help to separate vessel walls from the surrounding tissue and from the blood within them. Tissue types could possibly be thresholded.\n\n* Note - use the **IMREAD_ANYDEPTH** flag with cv2.imread() to maintain the bit depth.\n\n```python\ncv2.imread(\"train/kidney_1_dense/images/0798.tif\", cv2.IMREAD_ANYDEPTH)\n```",
      "votes": null
    },
    {
      "id": "2520323",
      "postDate": "11/10/2023 18:37:26",
      "content": "<p>Thanks for sharing. I think <code>tifffile.imread</code> does that inherently.</p>",
      "rawMarkdown": "Thanks for sharing. I think `tifffile.imread` does that inherently.",
      "votes": null
    },
    {
      "id": "2522450",
      "postDate": "11/12/2023 17:05:56",
      "content": "<p>Hi David, where did you find that images are 24 bit grayscale? tiff tags show 16 bits. Thanks!<br>\nImageWidth 1510<br>\nImageLength 1706<br>\nBitsPerSample 16<br>\nCompression COMPRESSION.NONE<br>\nPhotometricInterpretation PHOTOMETRIC.MINISBLACK<br>\nStripOffsets (208,)<br>\nSamplesPerPixel 1<br>\nRowsPerStrip 1706<br>\nStripByteCounts (5152120,)<br>\nXResolution (1, 1)<br>\nYResolution (1, 1)<br>\nResolutionUnit RESUNIT.NONE</p>",
      "rawMarkdown": "Hi David, where did you find that images are 24 bit grayscale? tiff tags show 16 bits. Thanks!\nImageWidth 1510\nImageLength 1706\nBitsPerSample 16\nCompression COMPRESSION.NONE\nPhotometricInterpretation PHOTOMETRIC.MINISBLACK\nStripOffsets (208,)\nSamplesPerPixel 1\nRowsPerStrip 1706\nStripByteCounts (5152120,)\nXResolution (1, 1)\nYResolution (1, 1)\nResolutionUnit RESUNIT.NONE",
      "votes": null
    },
    {
      "id": "2522677",
      "postDate": "11/12/2023 23:03:44",
      "content": "<p>You are correct <a href=\"https://www.kaggle.com/sakvaua\" target=\"_blank\">@sakvaua</a>. The tags and the range fit 16 bit for this comp. I think I was looking at an image from the UBC Ovarian Cancer instead.</p>",
      "rawMarkdown": "You are correct @sakvaua. The tags and the range fit 16 bit for this comp. I think I was looking at an image from the UBC Ovarian Cancer instead.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2520323,
      "author_name": "gunesevitan",
      "author_url": "",
      "post_date": "11/10/2023 18:37:26",
      "content": "<p>Thanks for sharing. I think <code>tifffile.imread</code> does that inherently.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2522450,
      "author_name": "sakvaua",
      "author_url": "",
      "post_date": "11/12/2023 17:05:56",
      "content": "<p>Hi David, where did you find that images are 24 bit grayscale? tiff tags show 16 bits. Thanks!<br>\nImageWidth 1510<br>\nImageLength 1706<br>\nBitsPerSample 16<br>\nCompression COMPRESSION.NONE<br>\nPhotometricInterpretation PHOTOMETRIC.MINISBLACK<br>\nStripOffsets (208,)<br>\nSamplesPerPixel 1<br>\nRowsPerStrip 1706<br>\nStripByteCounts (5152120,)<br>\nXResolution (1, 1)<br>\nYResolution (1, 1)<br>\nResolutionUnit RESUNIT.NONE</p>",
      "votes": null,
      "replies": [
        {
          "id": 2522677,
          "author_name": "davidbroberts",
          "author_url": "",
          "post_date": "11/12/2023 23:03:44",
          "content": "<p>You are correct <a href=\"https://www.kaggle.com/sakvaua\" target=\"_blank\">@sakvaua</a>. The tags and the range fit 16 bit for this comp. I think I was looking at an image from the UBC Ovarian Cancer instead.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2517982": "~~The images in this competition are 24 bit.~~ Edit: The images in this competition are 16 bit.\n\nEven though we can only see 8 bits of grayscale on our consumer grade monitors, we can observe that the pixel range in this image is *18,745* to *48,094*. The distribution is interesting.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4945934%2F5f6b550e5ec0b4b029a2efa5de128259%2FCapture.JPG?generation=1699487716747489&alt=media)\n\nSelectively normalizing certain pixel ranges will help to separate vessel walls from the surrounding tissue and from the blood within them. Tissue types could possibly be thresholded.\n\n* Note - use the **IMREAD_ANYDEPTH** flag with cv2.imread() to maintain the bit depth.\n\n```python\ncv2.imread(\"train/kidney_1_dense/images/0798.tif\", cv2.IMREAD_ANYDEPTH)\n```",
    "2520323": "Thanks for sharing. I think `tifffile.imread` does that inherently.",
    "2522450": "Hi David, where did you find that images are 24 bit grayscale? tiff tags show 16 bits. Thanks!\nImageWidth 1510\nImageLength 1706\nBitsPerSample 16\nCompression COMPRESSION.NONE\nPhotometricInterpretation PHOTOMETRIC.MINISBLACK\nStripOffsets (208,)\nSamplesPerPixel 1\nRowsPerStrip 1706\nStripByteCounts (5152120,)\nXResolution (1, 1)\nYResolution (1, 1)\nResolutionUnit RESUNIT.NONE",
    "2522677": "You are correct @sakvaua. The tags and the range fit 16 bit for this comp. I think I was looking at an image from the UBC Ovarian Cancer instead."
  },
  "source": "meta"
}