110 likes | 225 Vues
This project involves the development of an interactive painting application that utilizes RGB and HSV sliders to control the brush's color and transparency. Users can experience weighted mask-driven painting, where different pixels of the brush behave uniquely based on a defined alpha mask. The project emphasizes proper blending techniques using both RGB and HSV interpolation, allowing users to choose which color components to affect for dynamic effects. Key requirements include correctness, efficiency, user interface design, and adherence to programming style guidelines.
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.