[英]Java image Tile Processing, byte binary image
我正在用java處理大型tiff圖像。 我的對象只是讀取像素值,計算出墨水面積。
tiff圖像是黑白圖像,字節二進制圖像。 因此,我認為像素值為0或1,即白色為1,黑色為0。但是某些示例文件是正確的。 有些文件不是。 在某些文件中,0是黑色,1是白色。
可能嗎?
共同點是0:黑色,1:白色文件在Windows照片編輯器中處理。 在EskoArtwork影像引擎中處理0:白色,1:黑色。
圖像像素的定義可以根據引擎而改變嗎?
tiff圖像是黑白圖像,字節二進制圖像。 因此,我認為像素值為0或1,即白色為1,黑色為0。但是某些示例文件是正確的。 有些文件不是。 在某些文件中,0是黑色,1是白色。
可能嗎?
絕對。 這在TIFF標簽PhotometricInterpretation中指定。 摘錄是:
IFD Image
Code 262 (hex 0x0106)
Name PhotometricInterpretation
LibTiff name TIFFTAG_PHOTOMETRIC
Type SHORT
Count 1
Default None
Description
The color space of the image data.
The specification considers these values baseline:
0 = WhiteIsZero. For bilevel and grayscale images: 0 is imaged as white.
1 = BlackIsZero. For bilevel and grayscale images: 0 is imaged as black.
...
通過搜索“雙層tiff標簽”作為Google中的第二個鏈接,您可以輕松找到它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.