# 3.11.13 - PowerPoint PPT Presentation

1 / 12

3.11.13. It's a palindrome!. Announcements. March USACO 2nd to last round last day to take it if busy, can start late too because of CAHSEE tomorrow. Harker Programming Invitational (3/16) Cool prizes! This Saturday. Announcements (registration). Stanford ProCo (5/19) Cool prizes!

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

3.11.13

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

## 3.11.13

It's a palindrome!

### Announcements

• March USACO

• 2nd to last round

• last day to take it

• if busy, can start late too because of CAHSEE tomorrow.

• Harker Programming Invitational (3/16)

• Cool prizes!

• This Saturday

### Announcements (registration)

• Stanford ProCo (5/19)

• Cool prizes!

• Signups are in progress

• 6 team max per school

• Somewhat similar to USACO

• Series of qualification rounds

• Rounds get rapidly more difficult

• Registration begins tomorrow

## Image Blending

Source

Target

### Image Manipulation

• Images are made of pixels

• Colors are formed using red, green, and blue subpixels

• Brightness

• Calculated most simply as sum of red, green, and blue channels

• Calculated from neighboring pixels

• Take differences in brightness

• Is a vector:

• Magnitude

• Direction

Final

### General Idea

• To seemingly blend a pixel into another image, its neighboring pixel values must be known

• Need to consider how pixels change with respect to their neighbors

• Alter the boundary pixels of the foreground image to be equal to corresponding pixels of the background image

• Need to make an improved version of the foreground image that blends with the background image

### cont.

• Copies regions from a source image to a target image

• If one of the neighbors is a boundary pixel, its value is fixed

• Keep the transition smooth

• Preserve the gradient of the foreground image pixels

• The sum of the differences between a pixel and its neighbors

• If one of the neighbors is out of bounds of the selection, it is excluded

• Done for all pixels within the improved foreground

### cont.

• Assume there are n pixels in foreground

• Need to solve for every pixels

• System of linear equations in n variables

• n by n matrix

• N is very large

• Note that the matrix is very sparse

• Can use Gauss Jordan Elimination (RREF)

• too slow

• Use conjugate gradient

## Demo Time!

### PotW

Have fun at Harker Proco~