1 / 31

Image Editing II

Image Editing II. Simple Blending. = .7 x. + .5 x. Each pixel in a layer is multiplied by the same opacity value. Simple Blending. Opacity values can be visualized as gray levels. 0.7. 0.5. x. x. =. +. Complex Blending. Each pixel in a layer can have a different opacity value

tamal
Télécharger la présentation

Image Editing II

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. Image Editing II

  2. Simple Blending = .7 x + .5 x Each pixel in a layer is multiplied by the same opacity value

  3. Simple Blending Opacity values can be visualized as gray levels 0.7 0.5 x x = +

  4. Complex Blending • Each pixel in a layer can have a different opacity value • The opacity values for a layer’s pixels can be visualized as a grayscale image • This grayscale image is called a “mask”

  5. Layer Masks Complex Blending x x = +

  6. Selection Mask • One bit for each pixel 1 = selected 0 = not selected

  7. Selection Mask Image SelectMask Selecting all yellow and some red pixels

  8. Copy Image SelectMask PasteImage PasteMask

  9. Copy Algorithm for (every pixel [x,y] in the image) { if (selectMask[x,y] == 1) { pasteImage[x,y] = image[x,y]; pasteMask[x,y] = 1; } else { pasteMask[x,y] = 0; } }

  10. New Layer Composition Algorithm Image Layer = mask+image for (every pixel [x,y] in the layer) { if (mask[x,y] == 1) { new[x,y] = layer[x,y]; } else { new[x,y] = image[x,y]; } }

  11. Moving a Layer

  12. New Moving a Layer Image Layer = mask+image Move layer pixels without touching image pixels

  13. Replace with background color Cut What happens to the deleted pixels?

  14. Picture Editing

  15. Object representations of pictures • Types of objects • Lines • Rectangles • Ovals • Text • Curves • Pictures Text

  16. Picture = array of drawing objects 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Line(20,0,20,80,gray)

  17. Adding an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Line(20,0,20,80,gray) 3) Text(25,25,”Hello”, black,”Times” ) Hello

  18. Selecting an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Line(20,0,20,80,gray) 3) Text(25,25,”Hello”, black,”Times” ) Hello CurObj = 2

  19. Deleting an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Line(20,0,20,80,gray) 3) Text(25,25,”Hello”, black,”Times” ) Hello CurObj = 2

  20. Why no missing pixels? Deleting an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Text(25,25,”Hello”, black,”Times” ) Hello CurObj =

  21. Deleting an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Text(25,25,”Hello”, black,”Times” ) Hello Does object delete work like images or like text? CurObj =

  22. Moving an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(0,30,40,20,blue,purple) 2) Text(25,25,”Hello”, black,”Times” ) Hello

  23. Moving an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(30,30,40,20,blue,purple) 2) Text(25,25,”Hello”, black,”Times” ) Hello

  24. Changing an object 0) Rect(10,10,50,40,tan,yellow) 1) Oval(30,30,40,20,blue,purple) 2) Text(25,25,”Hello”, red,”Arial” ) Hello

  25. Move an object back

  26. Move an object back 0) Oval(30,30,40,20,blue,purple) 1) Rect(10,10,50,40,tan,yellow) 2) Text(25,25,”Hello”, red,”Arial”) Hello

  27. Select the “a” with magic wand Changing an imageSequoa -> Sequoia

  28. Drag the “a” to the right Changing an imageSequoa -> Sequoia Leaves ugly blank pixels

  29. Select text insertion point Change using objects Text object Image object Sequoa

  30. Change using objects Text object Image object Sequoia

  31. Compare • Why are images better than objects? • More realistic pictures • Easy to generate with cameras and scanners • Why are objects better than images? • Less space • Easier to make changes

More Related