You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Images with only 2 values (min/max) are suitable for encoding with CCITTFaxDecode and JBIG2 (when encoding support is ready).
Add a flag BinaryImageOptimization = true by default which looks at the image values and detects whether it is suitable for encoding with CCITTFaxDecode. Note that this is slightly different from #428 as this involves looking at the values (color histogram), for example a BitPerComponent = 8 using only color values 0/255 would be suitable for encoding as a binary image.
It might also make sense to define some threshold so that the number of pixels outside the min/max bins could be defined so that a certain percentage of pixels could fall outside and would be interpolated to the closest bin. For example if 99% of pixels fall into 0, 255 and then there are some pixels with values 1,5,9,230, 150, 250, those would be interpolated to the closest value 0,0,0,255,255,255 so that there are only 2 values prior to feeding to the CCITTFaxDecode algorithm. The threshold should be defined as BinaryImageOptimizationThreshold = 0.99 (float64).
The text was updated successfully, but these errors were encountered:
Images with only 2 values (min/max) are suitable for encoding with CCITTFaxDecode and JBIG2 (when encoding support is ready).
Add a flag
BinaryImageOptimization = true
by default which looks at the image values and detects whether it is suitable for encoding with CCITTFaxDecode. Note that this is slightly different from #428 as this involves looking at the values (color histogram), for example a BitPerComponent = 8 using only color values 0/255 would be suitable for encoding as a binary image.It might also make sense to define some threshold so that the number of pixels outside the min/max bins could be defined so that a certain percentage of pixels could fall outside and would be interpolated to the closest bin. For example if 99% of pixels fall into 0, 255 and then there are some pixels with values 1,5,9,230, 150, 250, those would be interpolated to the closest value 0,0,0,255,255,255 so that there are only 2 values prior to feeding to the CCITTFaxDecode algorithm. The threshold should be defined as
BinaryImageOptimizationThreshold = 0.99
(float64).The text was updated successfully, but these errors were encountered: