ImageResizer
3.4.0
|
Adaptive thresholding flood fill optimized for round objects. More...
Public Member Functions | |
AdaptiveCircleFill (UnmanagedImage red, System.Drawing.Point startAt, PointF origin, float maxRadius) | |
void | FirstPass () |
void | SecondPass () |
unsafe void | SetPixel (UnmanagedImage target, int x, int y, byte[] color) |
unsafe void | MarkFilledPixels (UnmanagedImage target, int xoffset, int yoffset, byte[] color) |
UnmanagedImage | GetBlurredMask () |
unsafe void | CorrectRedEye (UnmanagedImage image, int ox, int oy) |
Using the fill array calculated in passes 1 and 2, apply red-eye correction to the specified image. More... | |
Static Public Member Functions | |
static void | MarkEye (UnmanagedImage image, Point start, int maxEyeRadius, float maxPointSearchDistance=0) |
Public Attributes | |
UnmanagedImage | red |
An 8-bit image with a redness algorithm applied. More... | |
System.Drawing.Point | StartAt |
The pixel at which to begin filling More... | |
byte | MinValue = 80 |
The absolute minimum brightness to include. Should probably be set to 3/8ths the maximum pixel brightness. More... | |
byte | MaxValue = 255 |
The maximum brightness expected. Used to provide a range for threshold expectations More... | |
PointF | Origin |
The user-specified origin - used to adjust local thresholding. More... | |
double | OriginStartOffset |
The distance between origin and startat More... | |
float | MaxRadius |
The maximum radius around StartAt in which to fill More... | |
long | SumX = 0 |
Sum of the X values of all filled pixels. More... | |
long | SumY = 0 |
Sum of the Y values of all filled pixels More... | |
long | SumV = 0 |
Sum of the values of all filled pixels More... | |
long | FilledCount = 0 |
The number of filled pixels. More... | |
PointF | WeightedCenter |
Set after the first pass, once we know the appropriate center More... | |
float | FilledRadius |
Set after the first pass, once we know the farthest outlying point. More... | |
byte | FillAverage |
The average value of the filled area More... | |
bool[,] | filledArray |
An array matching the bitmap data, marking which pixels are considered filled. More... | |
Adaptive thresholding flood fill optimized for round objects.
Definition at line 15 of file AdaptiveCircleFill.cs.
|
inline |
red | A grayscale image filtered using a redness algorithm |
startAt | The maximum brightness point, the place to start filling |
origin | The origin of the search, usually the click |
maxRadius | The maximum distance from 'startAt' to consider filling |
Definition at line 24 of file AdaptiveCircleFill.cs.
|
inline |
Using the fill array calculated in passes 1 and 2, apply red-eye correction to the specified image.
image | |
ox | |
oy |
Definition at line 369 of file AdaptiveCircleFill.cs.
|
inlinestatic |
image | |
start | |
maxEyeRadius | Should be 2-3 percent of max(width/height) |
maxPointSearchDistance | In source pixels, the max distance from 'start' from which to look for the starting point. Good default: roughly 24 display pixels. |
Definition at line 47 of file AdaptiveCircleFill.cs.
byte ImageResizer.Plugins.RedEye.AdaptiveCircleFill.FillAverage |
The average value of the filled area
Definition at line 144 of file AdaptiveCircleFill.cs.
bool [,] ImageResizer.Plugins.RedEye.AdaptiveCircleFill.filledArray |
An array matching the bitmap data, marking which pixels are considered filled.
Definition at line 149 of file AdaptiveCircleFill.cs.
long ImageResizer.Plugins.RedEye.AdaptiveCircleFill.FilledCount = 0 |
The number of filled pixels.
Definition at line 130 of file AdaptiveCircleFill.cs.
float ImageResizer.Plugins.RedEye.AdaptiveCircleFill.FilledRadius |
Set after the first pass, once we know the farthest outlying point.
Definition at line 139 of file AdaptiveCircleFill.cs.
float ImageResizer.Plugins.RedEye.AdaptiveCircleFill.MaxRadius |
The maximum radius around StartAt in which to fill
Definition at line 113 of file AdaptiveCircleFill.cs.
byte ImageResizer.Plugins.RedEye.AdaptiveCircleFill.MaxValue = 255 |
The maximum brightness expected. Used to provide a range for threshold expectations
Definition at line 98 of file AdaptiveCircleFill.cs.
byte ImageResizer.Plugins.RedEye.AdaptiveCircleFill.MinValue = 80 |
The absolute minimum brightness to include. Should probably be set to 3/8ths the maximum pixel brightness.
Definition at line 94 of file AdaptiveCircleFill.cs.
PointF ImageResizer.Plugins.RedEye.AdaptiveCircleFill.Origin |
The user-specified origin - used to adjust local thresholding.
Definition at line 104 of file AdaptiveCircleFill.cs.
double ImageResizer.Plugins.RedEye.AdaptiveCircleFill.OriginStartOffset |
The distance between origin and startat
Definition at line 108 of file AdaptiveCircleFill.cs.
UnmanagedImage ImageResizer.Plugins.RedEye.AdaptiveCircleFill.red |
An 8-bit image with a redness algorithm applied.
Definition at line 85 of file AdaptiveCircleFill.cs.
System.Drawing.Point ImageResizer.Plugins.RedEye.AdaptiveCircleFill.StartAt |
The pixel at which to begin filling
Definition at line 90 of file AdaptiveCircleFill.cs.
long ImageResizer.Plugins.RedEye.AdaptiveCircleFill.SumV = 0 |
Sum of the values of all filled pixels
Definition at line 126 of file AdaptiveCircleFill.cs.
long ImageResizer.Plugins.RedEye.AdaptiveCircleFill.SumX = 0 |
Sum of the X values of all filled pixels.
Definition at line 118 of file AdaptiveCircleFill.cs.
long ImageResizer.Plugins.RedEye.AdaptiveCircleFill.SumY = 0 |
Sum of the Y values of all filled pixels
Definition at line 122 of file AdaptiveCircleFill.cs.
PointF ImageResizer.Plugins.RedEye.AdaptiveCircleFill.WeightedCenter |
Set after the first pass, once we know the appropriate center
Definition at line 135 of file AdaptiveCircleFill.cs.