From c5dac3042fc937aa02e785b096b082fcb0fdae3d Mon Sep 17 00:00:00 2001 From: "Jake W. Ireland" Date: Thu, 28 Jan 2021 11:21:09 +1300 Subject: [PATCH] Potential fix for 32-bit systems (addresses #50) --- .github/workflows/CI.yml | 8 +++++++- src/AdaBoost.jl | 22 +++++++++++----------- src/IntegralImage.jl | 4 ++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dd8c5b34e..70d800c19 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,13 @@ jobs: - windows-latest arch: - x64 - - x86_64 + - x86 + exclude: + # Test 32-bit only on Linux + - os: macOS-latest + arch: x86 + - os: windows-latest + arch: x86 steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 diff --git a/src/AdaBoost.jl b/src/AdaBoost.jl index 6d83bd0bd..df8cad4c1 100755 --- a/src/AdaBoost.jl +++ b/src/AdaBoost.jl @@ -169,11 +169,11 @@ end function learn( positive_path::AbstractString, negative_path::AbstractString, - num_classifiers::Int64=-1, - min_feature_width::Int64=1, - max_feature_width::Int64=-1, - min_feature_height::Int64=1, - max_feature_height::Int64=-1; + num_classifiers::Int=-1, + min_feature_width::Int=1, + max_feature_width::Int=-1, + min_feature_height::Int=1, + max_feature_height::Int=-1; scale::Bool = false, scale_to::Tuple = (200, 200) ) @@ -219,12 +219,12 @@ Iteratively creates the Haar-like feautures - `features::AbstractArray`: an array of Haar-like features found for an image """ function create_features( - img_height::Int64, - img_width::Int64, - min_feature_width::Int64, - max_feature_width::Int64, - min_feature_height::Int64, - max_feature_height::Int64 + img_height::Int, + img_width::Int, + min_feature_width::Int, + max_feature_width::Int, + min_feature_height::Int, + max_feature_height::Int ) notify_user("Creating Haar-like features...") features = HaarLikeObject[] diff --git a/src/IntegralImage.jl b/src/IntegralImage.jl index ac2a14ad0..9e05f118c 100755 --- a/src/IntegralImage.jl +++ b/src/IntegralImage.jl @@ -52,8 +52,8 @@ LinearIndices(A::IntegralArray) = Base.LinearFast() """ sum_region( integral_image_arr::AbstractArray, - top_left::Tuple{Int64,Int64}, - bottom_right::Tuple{Int64,Int64} + top_left::Tuple{Int,Int}, + bottom_right::Tuple{Int,Int} ) -> Number # Arguments