1 / 8

Chromakey

Chromakey. Barb Ericson Georgia Institute of Technology Oct 2010. Chroma Key – Blue Screen. For TV and movie special effects they use a blue or green screen Here just a blue sheet was used Professionally you need an evenly lit, bright, pure blue background With nothing blue in the scene.

braith
Download Presentation

Chromakey

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chromakey Barb Ericson Georgia Institute of Technology Oct 2010 Chromakey

  2. Chroma Key – Blue Screen • For TV and movie special effects they use a blue or green screen • Here just a blue sheet was used • Professionally you need an evenly lit, bright, pure blue background • With nothing blue in the scene Chromakey

  3. Chromakey Function def chromakey(source ,bg): # source should have something in front of blue # bg is the new background for x in range(0, getWidth(source )): for y in range(0, getHeight(source )): p = getPixel(source ,x,y) # if red + green < blue if (getRed(p) + getGreen(p) < getBlue(p)): setColor(p,getColor(getPixel(bg ,x,y))) return source Chromakey

  4. Testing chromakey markP = makePicture(getMediaPath("blue-mark.jpg")) newBack = makePicture(getMediaPath("moon-surface.jpg")) chromakey(markP,newBack) explore(markP) Chromakey

  5. Chromakey with a Greenscreen • Many movies use a green screen background for special effects • They use a program to replace the green background with a different background • We can do the same thing! Chromakey

  6. Chromakey Green def chromakeyGreen(source ,bg): # source should have something in front of a green background # bg is the new background for x in range(0, getWidth(source )): for y in range(0, getHeight(source )): p = getPixel(source ,x,y) # if green replace with new background if getGreen(p) > getBlue(p) + 10 and getGreen(p) > getRed(p) + 10: setColor(p,getColor(getPixel(bg ,x,y))) return source Chromakey

  7. Testing Chromakey Green jFile = getMediaPath("jenny2-green-small.jpg") jPict = makePicture(jFile) explore(jPict) bFile = getMediaPath("moon-surface.jpg") newBack = makePicture(bFile) chromakeyGreen(jPict,newBack) explore(jPict) Chromakey

  8. Challenge • Try copying just the non green pixels from the source picture (with the green background) to the new background • You can even specify where to start the copy at in the new background (initial x and y location) Chromakey

More Related