SaoYan / bgsCNN

Background subtraction using deep learning method.
GNU General Public License v3.0
191 stars 61 forks source link

numpy.core._internal.AxisError in test_video.py #2

Closed Cying212Jack closed 3 years ago

Cying212Jack commented 7 years ago

If the frame picture in the video is gray, then the variable "frame" is 2 dimension-arrary in the first part. This will cause an error when we want to combine two 2-d array in the second part as follow: numpy.core._internal.AxisError: axis 2 is out of bounds for array of dimension 2.

SaoYan commented 7 years ago

Thanks for your suggestion!

Numpy provides useful functions to expand or reduce dimensions of an array: np.squeeze() np.expand_dims()

Free free to modify the code and pull requests! Thanks again!