Previous question · 306
Diameter of Binary Tree
easyData Structures
Next question · 308
Power of Two
easyAlgorithms
Random coding question

307. Sliding window detection

medium
GeneralGeneral
staff
Function contract
Inputs
image
np.ndarray
stride
int
template
np.ndarray
Returns
value
tuple

Examples

Input
{
  "image": [
    [
      1,
      2,
      3,
      4
    ],
    [
      2,
      3,
      4,
      5
    ],
    [
      3,
      4,
      5,
      6
    ],
    [
      4,
      5,
      6,
      7
    ]
  ],
  "stride": 1,
  "template": [
    [
      2,
      3
    ],
    [
      3,
      4
    ]
  ]
}
Output
[
  0,
  0,
  1
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
staff
senior
entry
Tags
normalized-cross-correlation
sliding-window
template-matching
numpy

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
36 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands