Create pencil sketch from photo

Hello,
I’m trying to make a pencil sketch from a jpeg image,
I found this code using python libraries, but know nothing about Python.
Is there a way to do this in processing, also is there a way to do it without always showing the images?
I’ve reached this point so far…

void setup() {
  size(800, 754);
  // The image file must be in the data folder of the current sketch 
  // to load successfully
  img = loadImage("headshot.jpg");  // Load the image into the program  
}

void draw() {
  // Displays the image at its actual size at point (0,0)
  image(img, 0, 0);
  // Displays the image at point (0, height/2) at half of its size
 
 // image(img, 0, height/10, img.width/10, img.height/10);
  //image(img, 0, 0);
  delay (2000);
 blend(img, 0, 0, 800, 754, 0, 0, 800,754, DODGE);
 //delay (3000);
 //image(img,0,0);
 //filter(INVERT);
}

The steps are
destaurate the image
Color dodge the blend
Invert the layer
Apply a gaussian blur (of about 1 pixel)
Adjust the black level

I’m not sure how to use the HSL colormode with procesing
And also, how to get control with the gaussian layer
I’ve been able to output a desaturated jpeg from a photo editing package to start from.

PImage img;  // Declare variable "a" of type PImage

void setup() {
  noLoop();
  size(800, 754);
  // The image file must be in the data folder of the current sketch 
  // to load successfully
  img = loadImage("headshotsat1.jpg");  // Load the image into the program  
}

void draw() {
  
  // Displays the image at its actual size at point (0,0)
  image(img, 0, 0);
  // Displays the image at point (0, height/2) at half of its size
 
 // image(img, 0, height/10, img.width/10, img.height/10);
  //image(img, 0, 0);
  
 blend(img, 0, 0, 800, 754, 0, 0, 800,754, DODGE);

// image(img,800,0);
 filter(INVERT);
 // invert applies to the whole canvas
 filter(BLUR,5);
 // blur aplies to whole canvas
 
}