From the course: Computer Vision on the Raspberry Pi 4

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

NumPy array operations

NumPy array operations

- [Instructor] In an earlier video, I explained that OpenCV stores image data in NumPy arrays. When it comes to crunching numbers, these arrays are much more efficient than regular Python containers. Also, NumPy provides several capabilities that aren't available when using lists and dictionaries. It would take an entire course to present all of NumPy's features. For this course, you only need to know four of them: types and type conversion, slicing, centering, and standardization. Elements in a Python list can have any type, but elements in a NumPy array always have the same type. The arrays in this course all contain numbers, so we'll be concerned with signed integers, unsigned integers, and floating point values. Each type is represented by a field of the NumPy module. Integers are given by int or uint and the number of bits in each value. Floating point values are given by float32 or float64. In many cases, we'll…

Contents