├── .nvmrc
├── public
├── favicon.ico
├── favicon-16x16.png
├── favicon-32x32.png
├── apple-touch-icon.png
├── mstile-150x150.png
├── android-chrome-192x192.png
├── browserconfig.xml
├── manifest.json
├── index.html
└── safari-pinned-tab.svg
├── src
├── images
│ ├── logo.png
│ ├── baboon.jpg
│ ├── bugatti.jpg
│ ├── lenna.jpg
│ ├── peppers.jpg
│ └── headscarf.jpg
├── index.js
├── actions
│ ├── aboutActions.js
│ └── imageActions.js
├── reducers
│ ├── aboutReducer.js
│ └── imageReducer.js
├── components
│ ├── Checkbox.js
│ ├── SketchItButton.js
│ ├── UploadPrompt.js
│ ├── BrowserWarning.js
│ ├── ImagePane.js
│ ├── Header.js
│ ├── SketchedImage.js
│ ├── Slider.js
│ ├── UploadZone.js
│ ├── SettingsForm.js
│ ├── ImageButtons.js
│ ├── SettingsPane.js
│ ├── PresetImages.js
│ └── AboutModal.js
├── store.js
├── App.js
├── App.css
└── xdog.js
├── .gitignore
├── package.json
├── LICENSE.md
└── README.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | v8.9.1
2 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/src/images/logo.png
--------------------------------------------------------------------------------
/src/images/baboon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/src/images/baboon.jpg
--------------------------------------------------------------------------------
/src/images/bugatti.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/src/images/bugatti.jpg
--------------------------------------------------------------------------------
/src/images/lenna.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/src/images/lenna.jpg
--------------------------------------------------------------------------------
/src/images/peppers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/src/images/peppers.jpg
--------------------------------------------------------------------------------
/public/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/public/favicon-16x16.png
--------------------------------------------------------------------------------
/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/public/favicon-32x32.png
--------------------------------------------------------------------------------
/src/images/headscarf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/src/images/headscarf.jpg
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/public/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/public/mstile-150x150.png
--------------------------------------------------------------------------------
/public/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexpeattie/xdog-sketch/HEAD/public/android-chrome-192x192.png
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom'
3 | import App from './App'
4 |
5 | ReactDOM.render(
Upload a picture
13 |Drag and drop or select a file.
14 |This is a recreation of the XDoG image stylization technique as described in the Winnemoller et. al's papers XDoG: Advanced Image Stylization with eXtended Difference-of-Gaussians (DOI: 10.1145/2024676.2024700) and XDoG: An eXtended difference-of-Gaussians compendium including advanced image stylization (DOI: 10.1016/j.cag.2012.03.004). The app uses Google's deeplearn.js library to perform fast, GPU-accelerated image processing in the browser.
31 | 32 |Sigma 1 and Sigma 2 control the strength of the two gaussian functions whose difference is used for edge detection. A lower Sigma 1 will create finer details (mimicking a detailed sketch), while a higher Sigma 1 will yield less detail. Where Sigma 2 is much higher than Sigma 1, the lines will be thicker and vica-versa. Sigma 2 should generally always be greater than Sigma 1.
35 | 36 |Threshold defines the luminance threshold which used to binarize the image (convert to black & white) when you're not using XDoG mode. A lower threshold will mean more pixels become white, yielding a lighter image with thinner lines, and vica-versa. The threshold is quite sensitive, so images can quickly collapse to becoming white/very light or black/very dark.
37 | 38 |Sharpen (p) controls the strength of the sharpening that's applied when using XDoG mode. Sharpening with a large p exaggerates both the black and white edges present in the result.
39 | 40 |Phi (φ) controls the steepness of the soft thresholding that's applied when using XDoG mode. A larger phi will lead to a sharper black/white transitions in the image.
41 | 42 |Epsilon (ε) controls the level above which the adjusted luminance values will become white. A higher epsilon will yield a darker image with greater regions of blackness, and vica-versa. A low epsilon more closely emulates the behaviour of DoG mode.
43 | 44 |© 2017 Alex Peattie / alexpeattie.com / @alexpeattie
47 |