ArtifyLens is a project that has implemented some parts of a selfie app. Mainly three features have been implemented:
For the first feature, we have designed 2 instagram-like filters.
1. Pencil Sketch Filter - This will generate a sketch of the given image as shown in the output below.
- Grayscale Conversion: The image is first converted to
grayscale
, which removes all color and simplifies the image. - Image Inversion: The
grayscale
image isinverted
, creating a negative image that contrasts strongly with the original. - Gaussian Blur:
Gaussian blur
is applied to the inverted image to smooth out the details. - Sketch Creation: Finally, the original
grayscale
image is divided by theblurred negative
image to create apencil sketch
effect.
-
Grayscale Conversion: The image is first converted to
grayscale
to focus on the structure. -
Median Blur:
Median blur
is applied to reduce noise and smooth the image. -
Edge Detection:
Adaptive thresholding
is used to detect the edges, which are then highlighted in black to form the cartoon outlines. -
Bilateral Filtering:
Bilateral filter
is used to reduce the color palette of the image while preserving edges, creating the smooth, flat colors seen in cartoons. -
Combination: The color-reduced image is combined with the detected edges to produce the
cartoonified
effect.
Original Image | Cartoonified Image | Pencil Sketch |
---|---|---|
This feature involves the development of a blemish removal
tool that processes images to remove blemishes
or imperfections
from facial or object surfaces.
-
Initial Setup:
- The image (e.g.,
blemish.png
) is loaded into the program.
- The image (e.g.,
-
User Clicks on a Blemish:
- When the user clicks on a blemish in the image, the program automatically selects a patch from the surrounding area based on the smallest gradient and blends it onto the blemish location.
-
Viewing the Result:
- The user immediately sees the modified image with the blemish removed, and they can continue clicking on other blemishes to remove them.
-
Saving the Image:
- After editing, the user presses the
S
key to save the modified image asblemish_removed.png
.
- After editing, the user presses the
-
Resetting or Exiting:
- The user can press
R
to reset the image to its original form orESC
to exit the program.
- The user can press
Original Image | After Blemish Removal |
---|---|
This feature involves the use of chroma keying
(also known as green screen
or blue screen
) to remove a solid-colored
background from images or videos and mask it with another background.
-
Chroma Keying (Green Screen Removal):
- Removes a green background from the video or image using color-based segmentation.
- The selected green area is masked with a custom background.
-
Interactive Parameters: The user can adjust: ` - Tolerance: Adjusts the range of hues around the key color to be removed (e.g., shades of green).
- Softness: Smooths edges of the removed area to create a seamless blend with the new background.
- Defringe: Minimizes green color spill around object edges by adjusting channel brightness.
-
Mouse Click Color Selection:
- Users can interactively select the key color (e.g., green) by clicking on the video or image.
- The system dynamically adjusts parameters to match the chosen color.
-
Background Masking:
- After removing the background, the foreground subject is masked over the new background.
- The new background can either be a static image or a video.
-
Real-time Video Processing:
- Videos are processed frame by frame for smooth real-time playback with the chroma key effect applied.
-
Video Saving:
- After applying the effect, the user can save the processed video as
output.mp4
.
- After applying the effect, the user can save the processed video as
-
Annotations:
- Text annotations are added to the video for user guidance in
submission_chroma.py
.
- Text annotations are added to the video for user guidance in
Original Video | After Chroma Keying |
---|---|