Skip to content

Commit

Permalink
Merge pull request #1362 from rold2007/master
Browse files Browse the repository at this point in the history
Fixed typo in AdaptiveThreshold
  • Loading branch information
brianpopow authored Sep 26, 2020
2 parents b06cb32 + 856d8af commit ee30c71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ protected override void OnFrameApply(ImageFrame<TPixel> source)
ref TPixel color = ref Unsafe.Add(ref rowRef, x);
color.ToRgba32(ref rgb);

sum += (ulong)(rgb.R + rgb.G + rgb.G);
sum += (ulong)(rgb.R + rgb.G + rgb.B);

if (x - startX != 0)
{
intImage[x - startX, y - startY] = intImage[x - startX - 1, y - startY] + sum;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public void AdaptiveThreshold_SettingUpperLowerWithThresholdLimit_WithRectangle_
[Theory]
[WithFile(TestImages.Png.Bradley01, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.Bradley02, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.Ducky, PixelTypes.Rgba32)]
public void AdaptiveThreshold_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
Expand Down

0 comments on commit ee30c71

Please sign in to comment.