stratascratch
  • Interview Questions
    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs
    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log in
  • Interview Questions

    • Interview Loops
    • Analytical
    • Algorithm
    • ML Coding
    • Stats Coding
    • Visualization
    • Concept
  • Data Labs

    • Discover
    • Your Notebooks
  • Mock Interview
  • Learn
  • Blog
  • Pricing
  • About
Log inSign up
Back to Projects
  1. Assignment
  2. Your Solution
  3. Solutions from Users
  4. Discussion

Image to Pencil Sketch

You must be logged in to download the datasets

Adobe: Exploring RGB image data to uncover patterns, insights, and key questions.

Assignment

Select an image in RGB format and use the OpenCV Python library to transform it so that it resembles a pencil sketch.

Tips

  1. Convert the RGB image to grayscale - this will turn the image into a classic black-and-white photo;
  2. Invert the grayscale image - this is sometimes referred to as a negative image and can be used to enhance details;
  3. Mix the grayscale image with the inverted blurry image - this can be done by dividing the pixel values of the grayscale image by the pixel values of the inverted blurry image; the result should resemble a pencil sketch;
  4. Experiment by applying other transformations offered by the OpenCV library to improve the effect;

Data Description

We are providing you with a sample image of a dog, however, you can choose any colored image you want to complete this project.

Practicalities

Make sure that the solution reflects your entire thought process - it is more important how the code is structured rather than the final files.

This question is part of an interview loop

See the full interview round by round, with questions for each stage.

Big Tech platforms · Analytics Engineer