publiclab / image-sequencer

A pure JavaScript sequential image processing system, inspired by storyboards
https://sequencer.publiclab.org
GNU General Public License v3.0
110 stars 210 forks source link

Image to pencil sketch module. #993

Open harshithpabbati opened 5 years ago

harshithpabbati commented 5 years ago

A module which converts image into pencil sketch.

Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

harshithpabbati commented 5 years ago

I want to work on this by creating a meta module. imagesketch Does this looks like a image sketch.

harshkhandeparkar commented 5 years ago

Is this an edge detect meta module?

harshkhandeparkar commented 5 years ago

You can invert edge detect to do this

harshkhandeparkar commented 5 years ago

But it will take vwry long to process

harshkhandeparkar commented 5 years ago

And the image doesn't look quite like a sketch

harshkhandeparkar commented 5 years ago

It needs some shading

harshithpabbati commented 5 years ago

I did the same thing inverted edge detect.

harshithpabbati commented 5 years ago

I made the hysteresis false so it doesn't take much time.

harshkhandeparkar commented 5 years ago

:+1:

On Sat 6 Apr, 2019, 1:30 PM Harshith pabbati, notifications@github.com wrote:

I made the hysteresis false so it doesn't take much time.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/image-sequencer/issues/993#issuecomment-480484259, or mute the thread https://github.com/notifications/unsubscribe-auth/AhKOn0MAFkqD8gAjX_dRAZfPWADFsoePks5veFQngaJpZM4cgDGC .

harshithpabbati commented 5 years ago

But still it needs some effect to look like a sketch.

grvsachdeva commented 5 years ago

@jywarren @tech4GT any thoughts?

harshkhandeparkar commented 5 years ago

Can this be achieved through a simple filter? Or maybe separabale filters + post processing? @tech4GT do you know anything this?

harshkhandeparkar commented 5 years ago

Anything about this*

harshkhandeparkar commented 5 years ago

I created this by mistake

edge-detect

Does it look like a pencil sketch? @gauravano @Harshithpabbati @publiclab/is-reviewers @jywarren

harshkhandeparkar commented 5 years ago

Anyone would be surprised to know that it only contains pure black or pure white pixels, no intermediate

harshithpabbati commented 5 years ago

@HarshKhandeparkar lets make a trail invert it :)

harshithpabbati commented 5 years ago

May be invert module makes it to look more like a sketch module.

harshkhandeparkar commented 5 years ago

It is actually edge detect

harshithpabbati commented 5 years ago

Yeah I know.

harshkhandeparkar commented 5 years ago

I created it by mistake when I was finding opportunities for GPU accelerating edge-detect.

harshithpabbati commented 5 years ago

May be you can open a pr this will improve the edge detect module.

harshkhandeparkar commented 5 years ago

How will this improve edgeDetect?

harshithpabbati commented 5 years ago

It's edge detect module right?

harshithpabbati commented 5 years ago

Didn't you change anything in it?

harshkhandeparkar commented 5 years ago

I did remove gaussian blur from it

harshkhandeparkar commented 5 years ago

@Harshithpabbati I tried to reproduce the same img but I am not able to. I forgot what I had done yesterday :sweat_smile:. Sorry.

harshkhandeparkar commented 5 years ago

Ok new plan:

  1. Turn the image to greyscale(colormap)
  2. Run some kind of a filter over it to get this effect.(convolution)
rishabhshuklax commented 4 years ago

Does this looks like a image sketch? I followed this article. Screenshot from 2019-12-29 01-29-21 @harshithpabbati @jywarren @HarshKhandeparkar

harshkhandeparkar commented 4 years ago

I think it looks a bit more like pastel colors or watercolors. Maybe it needs to have some lines or gaps in between. We need to convolve some kind of filter.

harshkhandeparkar commented 4 years ago

I think we'll have to do some google research.

ataata107 commented 4 years ago

yo yo2

I was able to reproduce sketching in python. It may be possible for me to convert this into js. Can I proceed to this in javascript if you guys find the above results suitable. @HarshKhandeparkar @blurry-x-face

rishabhshuklax commented 4 years ago

Hi @ataata107 , I was also working on it and made this below image by

  1. Greyscale(using color map)
  2. Invert image
  3. Blur
  4. Blending the Greyscale and Blur image by using Color Dodge blend method(We don't currently support blending two images using color dodge but I am working on it I used a third party app for blending the two images)

Screenshot from 2020-01-02 19-16-14

If this looks good enough we can create this as a meta module.

rishabhshuklax commented 4 years ago

Also I found this project https://github.com/geraintluff/canvas-sketch if you could make something like this it looks really cool, It would be really great @ataata107

ataata107 commented 4 years ago

On it

ataata107 commented 4 years ago

https://github.com/geraintluff/canvas-sketch @blurry-x-face the above method transforms the canvas rather than the image as it put linestrokes on the canvas. I guess the real image needs to be transformed rather than the display canvas.