let numKeypoints = 0;

            let x = 0;
            let y = 0;

            for( let i = 0; i < rgba.length; i += 4 )
            {
                const response = rgba[i];

                if( response > 0 && x >= minX && y >= minY && x < maxX && y < maxY )
                {
                    keypoints[numKeypoints++] = { x: x, y: y, response: response };
                }

                if( ++x === width )
                {
                    x = 0;
                    y++;
                }
 