code goods
capstone.zip | |
File Size: | 192 kb |
File Type: | zip |
code_text.txt | |
File Size: | 21 kb |
File Type: | txt |
the code found in the 'CartoonApp.cs' file makes use of two external sources:
-the Sobel code is based off a translation of Visual Basic work done by St. Norbert Alum Damian Wegner and can be found here: http://compsci02.snc.edu/cs460/2005/wegndt/code.html
-the Palette Quantization code is open-source and can be found here (though much of the superfluous code has been excluded for economic purposes): http://www.codeproject.com/Articles/66341/A-Simple-Yet-Quite-Powerful-Palette-Quantizer-in-C
-the Sobel code is based off a translation of Visual Basic work done by St. Norbert Alum Damian Wegner and can be found here: http://compsci02.snc.edu/cs460/2005/wegndt/code.html
-the Palette Quantization code is open-source and can be found here (though much of the superfluous code has been excluded for economic purposes): http://www.codeproject.com/Articles/66341/A-Simple-Yet-Quite-Powerful-Palette-Quantizer-in-C
How to Use:
1. The CartoonApp was created in VisualStudio 10, though will surely run on older versions. For the user to access the program within the environment in which it was created, she ought only to open the 'Capstone.csproj' file (located in 'cartoonapp.zip') whilst having formerly installed VS10.
2. The program will open as a 'Windows Form Application,' immediately ready for compiling (control+alt+F5 to compile/run without debugging).
3. Once the .exe has opened, the process is somewhat self-explanatory. User should browse and select a file of some reasonable image type (e.g. .jpg, .png, .bmp, etc). Once the image is selected, the program will display a side-by-side before-and-after renditions of the original and the 'cartoonized' final product. Controls to keep in mind:
- Outline Sensitivity: by repositioning the cursor found in the top-right corner of the screen, users specify the desired sensitivity of lines (positioning the trackbar to the right increases sensitivity, to the left decreases)
- Color Count: a track bar can be found on the bottom-right which allows the user to determine number of colors used. The default is 32 colors, though some impromptu fidgeting may be required to reach the desired result (each photo will require a unique approach to the combination of both edge detection sensitivity and palette size).
- Save: the image can be saved as an image file. User is here, when prompted, expected to indicate via extension which format the file ought to be saved as.
Enjoy!
1. The CartoonApp was created in VisualStudio 10, though will surely run on older versions. For the user to access the program within the environment in which it was created, she ought only to open the 'Capstone.csproj' file (located in 'cartoonapp.zip') whilst having formerly installed VS10.
2. The program will open as a 'Windows Form Application,' immediately ready for compiling (control+alt+F5 to compile/run without debugging).
3. Once the .exe has opened, the process is somewhat self-explanatory. User should browse and select a file of some reasonable image type (e.g. .jpg, .png, .bmp, etc). Once the image is selected, the program will display a side-by-side before-and-after renditions of the original and the 'cartoonized' final product. Controls to keep in mind:
- Outline Sensitivity: by repositioning the cursor found in the top-right corner of the screen, users specify the desired sensitivity of lines (positioning the trackbar to the right increases sensitivity, to the left decreases)
- Color Count: a track bar can be found on the bottom-right which allows the user to determine number of colors used. The default is 32 colors, though some impromptu fidgeting may be required to reach the desired result (each photo will require a unique approach to the combination of both edge detection sensitivity and palette size).
- Save: the image can be saved as an image file. User is here, when prompted, expected to indicate via extension which format the file ought to be saved as.
Enjoy!
Below are extra code snippets for those particularly curious...
Sobel: contains original Sobel code which was later merged with the Palette Quantization algorithm for the final project.
Sobel: contains original Sobel code which was later merged with the Palette Quantization algorithm for the final project.
sobel.zip | |
File Size: | 821 kb |
File Type: | zip |