From af25f6abf822cc8767518c7854909f41307817b6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 23 Jul 2020 16:47:32 +0100 Subject: Remove GetHorizontalWindow as it wasnt used and rotating an image sideways before processing has the same result --- integralimg.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/integralimg.go b/integralimg.go index 4ae1791..b40944a 100644 --- a/integralimg.go +++ b/integralimg.go @@ -233,18 +233,6 @@ func (i I) GetVerticalWindow(x, width int) Window { return Window { i[0][x], i[0][maxx], i[maxy][x], i[maxy][maxx], width, maxy } } -// GetHorizontalWindow gets the values of the corners of a horizontal -// slice of an Integral Image, starting at y -func (i I) GetHorizontalWindow(y, height int) Window { - maxy := y + height - maxx := len(i[0]) - 1 - if maxy > len(i) - 1 { - maxy = len(i) - 1 - } - - return Window { i[y][0], i[y][maxx], i[maxy][0], i[maxy][maxx], maxx, height } -} - // Sum returns the sum of all pixels in a Window func (w Window) Sum() uint64 { return w.bottomright + w.topleft - w.topright - w.bottomleft -- cgit v1.2.1-24-ge1ad