/
CSCI 1290: Comp Photo Fall 2018 @ Brown University CSCI 1290: Comp Photo Fall 2018 @ Brown University

CSCI 1290: Comp Photo Fall 2018 @ Brown University - PowerPoint Presentation

danika-pritchard
danika-pritchard . @danika-pritchard
Follow
345 views
Uploaded On 2018-10-31

CSCI 1290: Comp Photo Fall 2018 @ Brown University - PPT Presentation

James Tompkin Many slides thanks to James Hays old CS 129 course along with all of its acknowledgements Questions from Tuesday Aaron Crepuscular rays during an eclipse Keiichiro Dark current sensor noise ID: 705710

dark 275 current noise 275 dark noise current pixels 175 sensor conv2 filter filter2 https cameras correlation leslie pixel

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "CSCI 1290: Comp Photo Fall 2018 @ Brown ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

CSCI 1290: Comp Photo

Fall 2018 @ Brown University

James Tompkin

Many slides thanks to James Hays’ old CS 129 course,

along with all of its acknowledgements.Slide2

Questions from Tuesday

Aaron:

Crepuscular rays during an eclipse

Keiichiro:

Dark current sensor noise

Eric

How can we model noise in general?

Leslie:

Why is I = D * D?Slide3

Aaron – Crepuscular Rays (shadowing)

[NASA]

[

Nilfanion

; Herby]

[Wikipedia]Slide4

Aaron – eclipse pinhole cameras!

[

PetaPixel

; https://petapixel.com/2012/05/21/crescent-shaped-projections-through-tree-leaves-during-the-solar-eclipse/

http://www.mreclipse.com/SEphoto/TSE2006/TSE2006galleryA.html]Slide5

Keiichiro – Dark Current

Residual current (rate of flow of charge) within a sensor when there is no illumination -> NOISE!

How to measure?

Put the lens cap on!

We will do this in lab 3…

[Canon;

Shigemi Numazawa]

ISO 51200

30 sec exposure

25 deg

celsiusSlide6

Keiichiro – Dark Current

Camera operation itself

Dark noise varies per pixel!

[Dunlap et al., Correction of Dark Current in Consumer Cameras, 2010; https://www.photonics.com/Articles/Dark_Current_in_Consumer_Cameras_Not_What_you/a44298]

Dark frame current under continual operation

(electrons per second)Slide7

Keiichiro – Dark Current

Ambient temperature

[Dunlap et al., Correction of Dark Current in Consumer Cameras, 2010;

https://www.photonics.com/Articles/Dark_Current_in_Consumer_Cameras_Not_What_you/a44298

https://www.cloudynights.com/topic/483729-new-canon-7dii-has-one-tenth-the-dark-current/]

Dark frame current (electrons per second)

Very important to astronomical imaging community – e.g., many forum posts:Slide8

Sensor cooling

[

PrismaLuceLab

; https://petapixel.com/2016/10/11/cooled-nikon-d5500a-chills-sensor-clearer-star-photos/]

Left-hand side: -2 deg Celsius

Right-hand side: 20 deg Celsius

‘Dark frame’; ISO 6400;

brightened 40%Slide9

Eric – How to model noise?

Dark current noise -> residual noise with no illuminant

Thermal noise -> ‘white’ noise, i.e., Gaussian

iid

per pixel

Shot noise -> variation in the number of photons sensed at a given exposure levelPoisson distribution; models discrete photons arriving at sensor pixels

Proportional to sqrt( intensity )Quantization noise -> analog to digital conversion noiseUniform; signal independentNoise floor -> sum of all noise (non-signal) across the imaging pipelineBelow this, no signal can be detectedE.G., defines limit on signal to noise ratio.

[Canon;

Shigemi Numazawa]Slide10

Eric – How to model noise?

Dead pixels -> sensor pixel always outputs 0 / receives no power

Stuck pixels -> sensor pixel always outputs the same value

Hot pixels

-> sensor pixel over outputs as gain / temperature increase

[Canon; Shigemi

Numazawa]

ISO 3200

(Brightness boosted 40%)

Not stars;

hot pixels!Slide11

Leslie – I = D * D

Mae – “…to do with lack of content (black) at edges”

D (275 x 175 pixels)

I (from slide – 275 x 175)Slide12

Leslie – I = D * D

>> D = im2double(

imread

( ‘convexample.png’ ) );

>> I = conv2( D, D );

>> max(max( I ) )ans

= 1.1021e+04>> I_norm = ( I – min(min(I))) / (max(max(I)) – min(min(I)) );>> imshow( I_norm );

D (275 x 175 pixels)

I (from slide – 275 x 175)

I_normSlide13

Leslie – I = D * D

D (275 x 175 pixels)

I_norm

For x: 275 + (275-1)/2 + (275-1)/2

= 549

275

(275-1)/2

(549 x 349 pixels)

(275-1)/2

I (from slide – 275 x 175)Slide14

Leslie – I = D * D

>> I = conv2( D, D, ‘full’ );

(Default; pad with zeros)

>> I = conv2( D, D, ‘same’ );

(Return same size as A)

>> I = conv2( D, D, ‘valid’ );

(No padding)

549 x 349

D (275 x 175 pixels)

I (from slide – 275 x 175)

275 x 175

1x1

Value = 10528.3Slide15

Practical matters

What about near the edge?

the filter window falls off the edge of the image

need to extrapolate

methods:

clip filter (black)wrap aroundcopy edgereflect across edge

[S.

Marschner

]Slide16

Filtering as template matching

Then I got ahead of myself and started talking about

when the filter ‘looks like’ the image… ‘template matching’…

Filtering viewed as comparing an image of

what you want to find against all image regionsSlide17

Earlier on, we had this example:

b) A = _ * _

In class, the response was:

A = B * C

Intuitively, “because it kind of looks like it.”

C is a Gaussian filter

(or something close to it it),

and we know that it ‘blurs’.Slide18

Filtering: Correlation and Convolution

2d correlation

2d convolution

conv2(

I,f

)

is the same as

filter2(rot90(f,2),I)

Correlation and convolution are identical when the filter is symmetric.

James Hays

h=filter2(

f,I

);

or

h=

imfilter

(

I,f

);

h=conv2(

f,I

); or h=

imfilter

(

I,f,’conv

’);Slide19

>> f = D( 57:117, 107:167 )

Expect response ‘peak’ in middle of I

>> I = filter2( D, f, ‘same’ );

f

61 x 61

D (275 x 175 pixels)

I

Response peak

Hmm…

That didn’t work – why not?

+

Correct location

[Thanks to Robert Collins @ Penn State]

OK, so let’s test this idea. Let’s see if we can use correlation to ‘find’ the parts of the image that look like the filter.Slide20

Correlation

As brightness in

I

increases, the response in

h

will increase, as long as f is positive.

h=filter2(

f,I

);

or

h=

imfilter

(

I,f

);Slide21

OK, so let’s subtract the mean

>> f = D( 57:117, 107:167 );

>> f2 = f – mean(mean(f));

>> D2 = D – mean(mean(D));

Score is higher only when dark parts

match and when light parts match.

>> I2 = filter2( Dm, f2, ‘same’ );

f2

61 x 61

D2 (275 x 175 pixels)

I2Slide22

Or even

>> I3 = filter2( D2, D2, ‘full’ );

I3

D2 (275 x 175 pixels)