110 likes | 262 Views
CS 248 – Project 1 Help Session. (demo) Painting RGB and HSV sliders Brush visualization Weighted mask driven painting HSV checkboxes. Basic painting. Brush region. Brush region. Compositing equation. C new = (1- ) C old + C paint. Simple tinting (alpha blending).
E N D
CS 248 – Project 1 Help Session • (demo) • Painting • RGB and HSV sliders • Brush visualization • Weighted mask driven painting • HSV checkboxes
Basic painting Brush region Brush region
Compositing equation Cnew = (1-) Cold + Cpaint Simple tinting (alpha blending) Like painting with partially transparent paint.
Mask driven painting Different pixels of the brush behave differently. Paint every pixel in the brush region Paint only some of the pixels
Weighted mask driven painting Mask contains alpha for each pixel in brush (visualization of this )
RGB interpolation CR = (1-) CR + paintR CG = (1-) CG + paintG CB = (1-) CB + paintB HSV interpolation CH = (1-) CH + paintH CS = (1-) CS + paintS CV = (1-) CV + paintV RGB vs. HSV interpolation (Does it make a difference?)
Hue Saturation Interpolating in HSV and RGB
Hue Saturation Painting in HSV and RGB HSV RGB
Tinting (HSV checkboxes) Choose which HSV components to affect. if (H_check) { CH = (1-) CH + paintH } if (S_check) { CS = (1-) CS + paintS } if (V_check) { CV = (1-) CV + paintV }
Requirements • Correctness (40%) • Don’t crash • Implement all required features • (Read the directions like a lawyer) • Efficiency (20 %) • No noticeable lag while using your application • User Interface (20%) • Programming Style (20%) • Copying code (Don’t do it) • Submitting with ‘freeze’ and ‘submit’
Extra credit (Filter painting) Blurring the image under the brush.