• No results found

Computer Vision. Image math. Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

N/A
N/A
Protected

Academic year: 2021

Share "Computer Vision. Image math. Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

Computer Vision

Image math

Copyright © 2001 – 2016 by

NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

j.van.de.loosdrecht@nhl.nl, jaap@vdlmv.nl

Image math

Add (subtract) constant value to all pixelsAdjust brightness

Add images

Extends exposure time (no Schwarzschild effect)Average out distortions and noise

Subtract images

Background elimination (logarithmic sensor)Motion detection

(2)

Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@nhl.nl

2

30-3-2016 Image math and geometric

operators

3

Demonstration Image math

Open image circles.jl

Demo add pixel 80, use LUT = clip

Close circles.jl

Demo subtract images: motion detection of people in the audience note: camera is necessary !

30-3-2016 Image math and geometric

operators

4

Demonstration Image math usage of mask

Demo selection with use of mask image, get grey values of ‘dice 6’

open image dice.jl

threshold 180 255

labels blobs, analyse pixels -> the six has labelnr 5

threshold 5 5

Fillholes (from segmentation menu)

multiply with original image:

everything is zero

(3)

30-3-2016 Image math and geometric operators

5

Image math for binary images

Binary images:Background = 0Object = 1

Used for masking operations:

AndOrExorNot Demonstration Or operatorDemo or:

threshold 4 4 on labelled image, in order to select dice ‘two’

or this image with binary image of the six

(4)

Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@nhl.nl

4

30-3-2016 Image math and geometric

operators

7

Image math

Abs (= absolute value for all pixels)Invert imageRemainder imagesMin imagesMax imagesMean imagesModulo images

ModuloPixel image pixel valuePower imageX imageY

PowerPixel image value

30-3-2016 Image math and geometric

operators

8

Demonstration Image math

(5)

30-3-2016 Image math and geometric operators

9

Exercise using masks

Image h1.jl

Exercise using masks

Use Int16Image h1.jl with has values in range [0..255]

a) write a script which changes all pixel with value 255 to 0, all other pixels are not changed

b) write a script which changes all pixel with value 100 to 0, all other pixels are not changed

c) write a script which changes all pixel with value 100 to 10, all other pixels are not changed

d) write a script which replaces all pixels with a specified mask value by a specified new value

(6)

Jaap van de Loosdrecht, NHL, vdLMV, j.van.de.loosdrecht@nhl.nl

6

30-3-2016 Image math and geometric

operators

11

Background subtract versus division

Purpose: to correct an inhomogeneous illumination Strategies:

Logarithmic sensor: subtract imagesLinear sensor: divide images

30-3-2016 Image math and geometric

operators

12

Demonstration background subtract versus division

Open image backsubdiv.jl (or use script backsubdiv.jls)

Demonstrate that thresholding is impossible, threshold 100 255

subtract:

read e backsubdiv.jl

minimumfilter e em EdgeExtend octagon7x7

maximumfilter em back EdgeExtend octagon7x7

copy e sub

subtract sub back

see result with analyse pixels

Threshold 10 255 finds the dots

divide:

convert e ef FloatImage

convert back backf FloatImage

// to avoid dividing zero and dividing by zero

addpixel ef 0.1 // note: use . and not ,

addpixel backf 0.1

copy ef divf

divide divf backf

see result with edit pixels

(7)

30-3-2016 Image math and geometric operators

13

Assignment using masks

Complete the scripts:

Assignment/Using_masks/A/script.jls

Complete the script by setting all pixels of the

letters/digits/minus signs to zero, while leaving other pixels unchanged

Assignment/Using_masks/B/script.jls (input is result of A)Complete the script by increasing the background of the NL

part by 80, while leaving other pixels unchangedAssignment/Using_masks/C/script.jls (input is result of B)

Complete the script by changing the entire background to 128 while leaving the other pixels unchanged

Tips: See next slide!

Hint using masks

Look at histogram

- Pixel values of the lettersrange from 0 to 70

- Pixel values of the NL background range from 70 to 130 - Pixel values of the platevalues range from 130 to 255

A)

B)

References

Related documents

E.g., files being processed (in Elan, Toolbox or Flex) and ancillary files (.typ, .prj, etc) that are only necessary while working to create the..

You can configure these features and set the destination phone numbers directly on the VoiceLine-enabled phone, from any touch-tone phone (via the Remote Account Center), or on the

In the Enter Phone Number field, enter the phone number by clicking the numbers on the WebPhone keypad, and then click the DIAL button or press the Enter key on the

This page contains various configuration settings for launching the dialer and establishing single-user or shared access to the PC. To access it, click the Configuration link on the

Analizamos a ontinua ión el omportamiento de la traye toria solu ión del modelo de. red neuronal

What top ten additional products or services can you provide to the first time repeat customer.

Prior to deploying the Linksys PAP2 device to your customer, it must be configured to point to Net2Phone’s provisioning server where it downloads its account information..

Press the back button (circular arrow soft key) three times to return to the main Settings Menu.. Scroll up to 3 Time and Date Settings and press the