Spatial Operators – Handling Edge Pixels
lesson
We run into problems when we take all of the pixels in a box around an input pixel and that pixel is close to one of the edges of the image. Let’s look at some strategies to deal with edge pixels.
lesson
We run into problems when we take all of the pixels in a box around an input pixel and that pixel is close to one of the edges of the image. Let’s look at some strategies to deal with edge pixels.
lesson
MATLAB normally deals with matrices of floating point numbers. An image is typically represented by an array of small integer values, pixel value or greyscale values, which have a limited dynamic range and special rules for arithmetic.
lesson
We can use MATLAB to display a profile of brightness along a line in the image.
lesson
We can describe the relationship between a 3D world point and a 2D image plane point, both expressed in homogeneous coordinates, using a linear transformation – a 3×4 matrix. Then we can extend this to account for an image plane which is a regular grid of discrete pixels.
lesson
So far we have taken a linear combination of pixels in the box around the input pixel, but non-linear operations like sorting and ranking the pixel values also prove to be very useful. We look at the median filter which is much better at removing salt and pepper noise from image than simple smoothing.
lesson
If we want to process images the first thing we need to do is to read an image into MATLAB as a variable in the workspace. What kind of variable is an image? How can we see the image inside a variable? How do we refer to to individual pixels within an image.
lesson
Most of us have lots of digital images captured using cameras or phones. Each image comprises millions of picture elements or pixels. The images are stored in files, typically in JPEG format, and we’ll see what’s inside one of these files.
lesson
When a camera moves in the world, points in the image move in a very specific way. The image plane or pixel velocity is a function of the camera’s motion and the position of the points in the world. This is known as optical flow. Let’s explore the link between camera and image motion.
lesson
The linear algebra approach we’ve discussed is very well suited to MATLAB implementation. Let’s look at some toolbox functions that can simulate what cameras do. If you are using a more recent version of MVTB, ie. MVTB 4.x then please change>> cam.project(PW ‘Tcam’, transl(0.1, 0, 0)) to >> cam.project(PW ‘pose’, transl(0.1, 0, 0)).
lesson
Taking an average of pixels in a box leads to artefacts such as ringing which we can remedy by taking a weighted average of all the pixels in the box surrounding the input pixel. The set of weights is referred to as a kernel. A common kernel used for image smoothing is the Gaussian kernel.