## 3 Materials and Methods
### Terminology, Notation, and Definitions  
We use the terms frame and image interchangeably to refer to two-dimensional (2D) pixel matrices where pixels can be either real non-negative numbers or, as is the case with multi-channel images (e.g., PNG or BMP), tuples of real non-negative numbers. We use pairs of matching left and right parentheses to denote sequences of symbols. We use the set-theoretic membership symbol \(\in\) to denote when a symbol is either in a sequence or in a set of symbols. We use the universal quantifier \(\forall\) to denote the fact that some mathematical statement holds for all mathematical objects in a specific set or sequence  
Figure 1: BeePi monitor (**a**) on top of Langstroth beehive of 3 supers; BeePi’s hardware components are in top green super; pi camera (**b**) is looking down on landing pad and is protected against elements by wooden box; hardware details and assembly videos are available at [23; 24]. and use the existential quantifier \(\exists\) to denote the fact that some mathematical statement holds for at least one object in a specific set or sequence. We use the symbols \(\wedge\) and \(\vee\) to refer to the logical and and the logical or, respectively. Thus, \((\forall i\in\mathbb{N})(\exists j\in\mathbb{N})(j>i)\) states a common truism that for every natural number \(i\) there is another natural number \(j\) greater than \(i\). Let \(X=(x_{i_{1}},\ldots x_{i_{n}})\) and \(Y=(y_{j_{1}},\ldots,y_{j_{m}})\) be sequences of symbols, where \(n,m\) are positive integers. We define the intersection of two symbolic sequences \(Z=X\cap Y\) in Equation (1), where \(l,k\) are positive integers, \(z_{r}\in X\wedge z_{r}\in Y\wedge z_{r}\
eq z_{s}\) whenever \(r\
eq s\), for \(l\leq r\leq l+k\) and \(l\leq s\leq l+k\). If two sequences have no symbols in common, then \(X\cap Y=()\). \[Z=X\cap Y=(z_{l},\ldots,z_{l+k}), \tag{1}\]  
We define a video to be a sequence of consecutive equi-dimensional 2D frames \((F_{t},\ldots,F_{j},\ldots,F_{t+k})\), where \(t\), \(j\), and \(k\) are positive integers such that \(t\leq j\leq t+k\). Thus, if a video \(V\) contains 745 frames, then \(V=(F_{1},\ldots,F_{j},\ldots,F_{745})=(F_{1},\ldots,F_{1+744})\), \(1\leq j\leq 745\). By definition, videos consist of unique frames so that if \(F_{l}\in V\) and \(F_{k}\in V\), then \(l\
eq k\). It should be noted that \(F_{l}\) and \(F_{k}\) may be the same pixelwise. Any smaller sequence of consecutive frames of a larger video is also a video. For example, if \(V=(F_{1},\ldots,F_{745})\) is a video, then so are \(V^{\prime}=(F_{17},\ldots,F_{745})\) and \(V^{\prime\prime}=(F_{5},\ldots,F_{23})\). When we discuss multiple videos that contain the same frame symbol \(F_{l}\) or when we want to emphasize specific videos under discussion, we use superscripts in frame symbols to reference respective videos. Thus, if videos \(V^{\prime}\) and \(V^{\prime\prime}\) include \(F_{23}\), then \(F_{23}^{V^{\prime}}\) designates \(F_{23}\) in \(V^{\prime}\) and \(F_{23}^{V^{\prime\prime}}\) designates \(F_{23}\) in \(V^{\prime\prime}\). Let \(V=(F_{t},\ldots,F_{t+k})\) be a video, \(F_{l}\in V\), and \(\Delta\) be a positive integer. A frame's context in \(V\), denoted as \(K_{l,\Delta}^{V}\), is defined in Equation (2). \[K_{l,\Delta}^{V}=(F_{\phi(l-\Delta)},F_{\phi(l-\Delta+1)},\ldots,F_{\phi(l)}, \ldots,F_{\phi(l+\Delta)})\cap V, \tag{2}\]  
where  
\[\phi(x)= \begin{cases}x&\text{if }t\leq x\leq t+k;\\ t&\text{if }x<t;\\ t+k&\text{if }x>t+k.\end{cases} \]  
In other words, the context \(K_{l,\Delta}^{V}\) of \(F_{l}^{V}\) is a video that consists of a sequence of consecutive \(\Delta\) or fewer frames (possibly empty) that precede \(F_{l}^{V}\) and a sequence of \(\Delta\) or fewer frames (possibly empty) that follow it. We refer to \(\Delta\) as a context size and to \(K_{l,\Delta}^{V}\) as the \(\Delta\)-context or, simply, context of \(F_{l}^{V}\) and refer to \(F_{l}^{V}\) as the contextualized frame of \(K_{l,\Delta}^{V}\).