Creating RAW file
A RAW file is a file containing minimally processed data from an image sensor. We can create this file using the tofile() method of the scipy package.
Example: Creating RAW file using SciPy
Python3
from scipy import misc import imageio import matplotlib.pyplot as plt # reads a raccoon face face = misc.face() face.tofile( "raccoon.raw" ) |
This will create a .raw file in our current working directory.
Image Processing with SciPy and NumPy in Python
In this tutorial, we will discuss Image Processing in Python using the core scientific modules like NumPy and SciPy. The images are made up of NumPy ndarrays so we can process and manipulate images and SciPy provides the submodule scipy.ndimage that provides functions that can operate on the NumPy arrays.
We will discuss how to open and write to images, and will also cover different manipulation and filtering techniques. So before getting started let’s see how to install both modules.