• Tidak ada hasil yang ditemukan

Computer Vision

N/A
N/A
Protected

Academic year: 2024

Membagikan "Computer Vision"

Copied!
27
0
0

Teks penuh

(1)

2A-L1 Images as functions

CS4495/6495

Introduction to Computer Vision

(2)

Images as functions

(3)

Images as functions

(4)

Images as functions

(5)

Images as functions

(6)

Quiz

An image can be thought of as:

a) A 2-dimensional array of numbers ranging from some minimum to some maximum

b) A function I of x and y: 𝐼(𝑥, 𝑦)

c) Something generated by a camera.

d) All of the above.

(7)

Images as functions

We think of an image as a function, 𝑓 or 𝐼, from 𝑅2 to 𝑅:

𝑓(𝑥, 𝑦) gives the intensity or value at position (𝑥, 𝑦)

(8)

Images as functions

We think of an image as a function, 𝑓 or 𝐼, from 𝑅2 to 𝑅:

𝑓(𝑥, 𝑦) gives the intensity or value at position 𝑥, 𝑦

Practically define the image over a rectangle, with a finite range:

𝑓: [𝑎, 𝑏] 𝑥 [𝑐, 𝑑]  [𝑚𝑖𝑛, 𝑚𝑎𝑥]

(9)

Color images as functions

A color image is just three functions “stacked”

together. We can write this as a “vector-valued”

function:

Source: S. Seitz

( , )

( , ) ( , )

( , ) r x y f x y g x y

b x y

(10)

The real Phyllis

(11)

Digital images

In computer vision we typically operate on digital (discrete) images:

Sample the 2D space on a regular grid

Quantize each sample (round to “nearest integer”)

Adapted from S. Seitz

(12)

Digital images

Image thus represented as a matrix of integer values.

Adapted from S. Seitz

(13)

Adapted from S. Seitz

2D

1D

i

j

(14)

Matlab – images are matrices

(15)

Matlab – images are matrices

>> im = imread('peppers.png'); % semicolon or many numbers

>> imgreen = im(:,:,2);

(16)

100 200 300 400 500 100

200

300

400

500

Matlab – images are matrices

>> im = imread('peppers.png'); % semicolon or many numbers

>> imgreen = im(:,:,2);

>> imshow(imgreen)

>> line([1 512], [256 256],'color','r')

>> plot(imgreen(256,:));

(17)

Noise in images

Noise is just another function that is combined with the original function to get a new – guess what – function

¢

I ( x, y) = I ( x, y ) + h ( x, y )

(18)

Common Types of Noise

Salt and pepper noise: random occurrences of black and white pixels

(19)

Common Types of Noise

Impulse noise: random occurrences of white pixels

(20)

Common Types of Noise

Gaussian noise: variations in intensity drawn from a Gaussian normal distribution

(21)

Gaussian noise

Fig: M. Hebert

>> noise = randn(size(im)).*sigma;

>> output = im + noise;

(22)

Noise images: Images showing noise values generated with

different sigma

𝜎 = 2, 8, 32, 64

Guess sigma for each noise image

sigma =

sigma = sigma =

sigma =

noise = randn(size(im)).*sigma

Quiz: Effect of σ on Gaussian noise

(23)

Noise images: Images showing noise values generated with

different sigma

𝜎 = 2, 8, 32, 64

Guess sigma for each noise image

noise = randn(size(im)).*sigma

Quiz: Effect of σ on Gaussian noise

sigma = 2

sigma = 8 sigma = 32

sigma = 64

(24)

Values of σ to use

A 𝜎 of 1.0 would be tiny if the range is [0 255]

but huge if pixels went from [0.0 1.0].

Matlab can do either and you need to be very careful - if in doubt convert to doubles.

(25)

Displaying images in Matlab

Look at the Matlab function imshow()

imshow(im,[LOW HIGH])

will display the image im with value LOW as black and HIGH as white.

(26)

Displaying images in Matlab

Look at the Matlab function imshow()

imshow(im,[])

will display the image im with the based on the range of pixel values in im.

(27)

Quiz

When adding noise to images as arithmetic operators we have to worry about:

a) The speed of the addition operation

b) The magnitude of noise compared to the range of the image

c) Whether we add the noise to the image or the image to the noise (the order of operation)

d) None of the above

Gambar

Fig: M. Hebert

Referensi

Dokumen terkait

When working with images there are many things to carry on in mind such as loading an image, using the right format, saving the data as different data types, how to display an

Power colors are the rich, deep shades that project a powerful business image.. Usually, shades such as black, charcoal grey and navy are considered to give

In this section, we analyze image fusion method that can be used for high-resolution satellite image fusion, such as those for fusion of panchromatic and multi-spectral

The alt attribute defines alternative text that appears if the browser can’t display the image, such as if the image file is missing if the browser doesn’t support dis -

As the developments in the field of computer vision are related closely to image processing and machine learning, it can be used to more extensive areas of studies to predict or detect

As can be seen from the Table, the complexes in the cancer cells exhibit low dark toxicity and high light toxicity, especially complex Ir3, displaying excellent photodynamic therapy

Figure 4.3 Grayscale image with resolution of 80-by-60 The image has the same value now as it is in black and white form.. This is easier to process as the image can be read as 0 and 1

Since the digital images taken for crack analysis include various difficulties such as low contrast and uneven illumination for the image analyzing process, this study developed an