\begin{tikzpicture}
	\tikzset{
		mstyle/.style={column sep=-\pgflinewidth,row sep=-\pgflinewidth,font=\footnotesize,},
		window/.style={draw,very thick,blue},
	}

	\matrix(convmat1)[matrix of nodes,ampersand replacement=\&,column sep=-\pgflinewidth,row sep=-\pgflinewidth,nodes in empty cells,
	nodes={draw,rectangle, font=\tiny,minimum height=4mm,minimum width=4mm,anchor=south}]{
		0\&  0\&  0\&  0\& 0\& 0\& 0\& 0\&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  \&  \&  \&  \&  \& \& \&0\\ 
		0\&  0\&  0\&  0\&  0\& 0 \&  0\& 0\&0\\
	};
	

	\foreach \i/\j [count=\xi from 0] in {1/3,3/5,5/7,7/9}{%,10/12,13/15,16/18,19/21,22/24,25/27}{
		\foreach \k/\m [count=\yi from \xi*4+3] in {1/3,3/5,5/7,7/9}{%,10/12,13/15,16/18,19/21,22/24,25/27}{
			\onslide<\yi>{
				\draw[window](convmat1-\i-\k.north west)rectangle(convmat1-\j-\m.south east);

			}
		}
	}
	%   \foreach \i/\j [count=\xi from 3] in {1/3,4/6,7/9,10/12,13/15}{
	% \onslide<\xi>{
	%   \draw[window](convmat1-1-\i.north west)rectangle(convmat1-3-\j.south east);
	% }

	% }      
	


	\matrix(convmat2)[right of=convmat1,node distance=10em,matrix of nodes,ampersand replacement=\&,column sep=-\pgflinewidth,row sep=-\pgflinewidth,nodes in empty cells,
	nodes={draw,rectangle, font=\footnotesize,anchor=south,minimum height=4mm,minimum width=4mm}]{
		\&  \&  \& \\
		\&  \&  \& \\
		\&  \&  \& \\
		\&  \&  \&  \\
	};
	
	
	% \foreach \i/\j [count=\xi from 3] in {1/1,2/2,3/3,4/4,5/5}{
	%  \onslide<\xi->{
	%    \draw[fill=black] (convmat2-1-\j)circle(1.5pt);
	%  }
	
	%  }
	\foreach \i [count=\xi from 0] in {1,...,4}{
		\foreach \j [count=\yi from \xi*4+3] in {1,...,4}{
			\onslide<\yi->{
				\draw[fill=black] (convmat2-\i-\j)circle(1.5pt);
			}
		}
	}
	
	\node(text)[left of = convmat2,node distance=3em, anchor=east]{\footnotesize \textsf{=}};   
\end{tikzpicture}