ImageGear for Java
ImGearBitonalReductionOptions Class Members
Fields 

The following tables list the members exposed by ImGearBitonalReductionOptions.

Public Constructors
 NameDescription
Public ConstructorImGearBitonalReductionOptions ConstructorDefault constructor  
Top
Public Fields
 NameDescription
Public FieldmodeDetermines how the red, green, and blue color components of a pixel contribute to its brightness when compared to the threshold value.

If you set Mode to WEIGHTED, you may also set the values of Weight1, Weight2, and Weight3. These "weights" are used to determine how much influence the values of the red, green, or blue pixels will have on the reduction. For example, if Weight1 (red) = 255, Weight2 (green) = 0, Weight3 (blue) = 0, the whole reduction will depend on the value of the red pixels. The green and blue pixel values will have "no weight".

Setting Mode to GRAYSCALE gives the most weight to the value of green. This optimizes for the perception of the human eye, in which blue is the hardest color to see, and therefore requires the least weight.

A Mode of AVERAGE gives equal weight to all three pixel values.

Here are the formulas used by the three different reduction methods:

  • GRAYSCALE: value = (red*77 + green*151 + blue*28)/256;
  • AVERAGE: value = (red + green + blue)/3;
  • WEIGHTED: value = (red*w1 + green*w2 + blue*w3)/(w1 + w2 + w3);

Value from ImGearBitonalReductionModes enumeration.

 
Public FieldthresholdThis option sets the threshold value for converting pixels to black or white.

If the value of a pixel, as calculated by one of the reduction methods, is less than Threshold, the pixels will be set to black; if it is greater than or equal to Threshold, the pixels will be set to white. So, a smaller value for Threshold will make the output appear more black, while a larger value will make the output appear more white.

Integer in the range 0-255.

 
Public Fieldweight1This option specifies the weight given to the red color component when considering the value of an input pixel for comparison to the threshold field value.

This option is only used if mode field is set to WEIGHTED.

Integer in the range 0-255.

 
Public Fieldweight2This option specifies the weight given to the green color component when considering the value of an input pixel for comparison to the threshold field value.

This option is only used, if mode field is set to WEIGHTED.

Integer in the range 0-255.

 
Public Fieldweight3This option specifies the weight given to the blue color component when considering the value of an input pixel for comparison to the threshold field value.

This option is only used if mode field is set to WEIGHTED.

Integer in the range 0-255.

 
Top
See Also

Reference

ImGearBitonalReductionOptions Class
com.accusoft.imagegear.processing Package

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback