Академический Документы
Профессиональный Документы
Культура Документы
FUNDAMENTALS
Pixel intensity
value
f(1,1) =
103
Pixel
location
In 8-bit representation
Pixel intensity values
rows column change between 0
s (Black) and 255 (White)
f(645:650,1323:132
8) =
83 82 82 82 82 82
82 82 82 81 81 81
82 82 81 81 80 80
82 82 81 80 80 79
80 79 78 77 77 77
80 79 78 78 77 77
f(2724,2336)
= 88
QUALITY OF AN IMAGE
Basically, an image is of good quality if
It is not noisy
It is not blurred.
It has high resolution.
It has good contrast.
SAMPLE IMAGES
TYPES OF DIGITAL IMAGES
The images types we will consider are:
1) Gray-scale
2) Color(RGB)
3) Binary
Gray Image Color Image
Binary Image
GRAY-SCALE IMAGES
Grayscale images are monochrome(one-color)
images, means they have only one color. Grayscale
images do not contain any information about color.
The number of bits used for pixel determines the
number of different grey levels available.
A typical grayscale image contains 8 bits/pixel data,
which has 256 different grey levels.
Gray-scale images Cont..
RGB components
10 10 16 28
9 656 70 26
56 43
3756 78
32 99 54 96 67
70
15 256013902296 67
21 54 47 42 14
32 15 87 39
85 85 43 92
54 65 65 39
32 65 87 99
BINARY IMAGES
It is the simplest type of image. It takes only two
values i.e, Black and White or 0 and 1. The binary
image consists of a 1-bit image and it takes only 1
binary digit to represent a pixel.
Binary images are mostly used for general shape or
outline.
Binary images are generated using threshold operation.
When a pixel is above the threshold value, then it is
turned white('1') and which are below the threshold
value then they are turned black('0')
Binary Images Cont…
Binary data
0 0 0 0
0 0 0 0
1 1 1 1
16
1 1 1 1
IMAGE DISPLAY USING OPENCV-
PYTHON
Example:
import cv2
import numpy
img1=cv2.imread('image.jpg')
cv2.imshow('Image1',img1)
cv2.waitKey(0)
cv2.destroyAllWindows()
OpenCV-Python is a library of Python bindings designed to solve computer vision
problems.
Methods:
cv2.imread(path, flag) --loads an image from the specified path. If the image cannot
be read then this method returns an empty matrix.
path: A string representing the path of the image to be read.
flag: It specifies the way in which image should be read.