Image Processing Reference
In-Depth Information
If we want to find pixels with brightness above a specified level, we use thresholding .
The operator is:
threshold(pic,value):= for x 0..cols(pic)-1
Cover the whole picture
for y 0..rows(pic)-1
newpic y,x
255 if
Set any point above the
pic y,x value
threshold to white,
newpic y,x
0 otherwise otherwise set it to
black
newpic
Return the new picture
Let's try it out: new_pic:=threshold(eye,161) by picking out points in the
eye image brighter than 160.
So all points above the threshold are set to 255 (white), those below are set to 0 (black).
0123456789 0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
2
3
4
5
6
7
8
9
10
11
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
new_pic =
12
0
0
0
0
0
0
0
0
0
0
0
(b)
(a)
Try different values for the threshold, other than 160.
We'll now move on to group operators where the new pixel values are the result of
analysing points in a region , rather than point operators which operate on single points.
First, we have a template which describes the region of interest and we then convolve this
by summing up, over the region of the template, the result of multiplying pixel values by
the respective template ( weighting ) coefficient. We can't process the borders since part of
the template falls outside the picture. Accordingly, we need an operator which sets an
image to black, so that the borders in the final image are set to black. Black is zero
brightness values, so the operator which sets a whole image to black is:
Search WWH ::




Custom Search