summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-07-23 16:47:32 +0100
committerNick White <git@njw.name>2020-07-23 16:47:32 +0100
commitaf25f6abf822cc8767518c7854909f41307817b6 (patch)
treee5e13a7f5435d216191c67665ad775f89e6cc9c5
parent579b7b293feb01af6c47104ac56394cd3fbd1695 (diff)
Remove GetHorizontalWindow as it wasnt used and rotating an image sideways before processing has the same result
-rw-r--r--integralimg.go12
1 files changed, 0 insertions, 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