Converting between different data types and scaling values

This recipe tells you how to change the data type of matrix elements from uint8 to float32 and perform arithmetic operations without worrying about clamping values (and then convert everything back to uint8).