1. Hough transform for lines 2. Straighten op to align detected vert, horiz lines 3. quantizer to find regularity of grid and dimension 4. sampler (using various techniques) to detect color at center (area) of grid points. Implement using Python and openCV - initial start here as rough guide - http://stackoverflow.com/questions/19054055/python-cv2-houghlines-grid-line-...
On 1/25/2015 2:57 PM, Krzysztof KosiĆski wrote:
Hello
For one of the courses I am doing at the university, I want to create a pixel art cleaner which would complement the recent GSoC pixel art vectorizer. It is a well known problem that most pixel art images available on the Internet are not appropriate inputs for the vectorizer: they have multiplied pixels, additional grids, various artifacts, defacements with watermarks, etc. Here are a few examples:
- Multiplied pixels only:
http://research.microsoft.com/en-us/um/people/kopf/pixelart/supplementary/re...
- Border, grid, JPEG artifacts:
http://img.wonderhowto.com/img/56/01/63456484792752/0/make-pixel-art-minecra...
- Grid, imperfect alignment:
http://fc04.deviantart.net/fs70/i/2013/258/6/b/link_pixel_art_grid_by_matbox...
- Grid, imperfect alignment, defacement:
http://1.bp.blogspot.com/-jOu8vhgnSFQ/U7sQV0HSRwI/AAAAAAAACEs/2lGHanqeF90/s1...
- Grid, nonuniform pixel colors:
http://fc06.deviantart.net/fs71/f/2011/227/6/4/link_pixel_art_by_malandrus-d...
- Scan of a hand-filled grid paper:
http://th04.deviantart.net/fs71/PRE/f/2013/207/5/b/goku_pixel_art_by_hideman...
- Photographs:
http://fc03.deviantart.net/fs71/i/2013/336/1/6/glumanda_pixel_art_by_beffra-... http://farm8.staticflickr.com/7258/7434425816_9b810a3b6d_z.jpg
I'm looking for a few ideas on how to design an algorithm that would automatically convert these images to a clean input to the pixel art vectorizer. Obviously any successful algorithm will exploit three basic facts about pixel art:
- The pixels are laid out in a rectangular grid.
- Color within a pixel is uniform.
- The color palette is limited.
My first guess is to use a GSL and find the parameters of the pixel grid by using a generic optimizer. The cost function could include the variance of color within a pixel, area of the pixels (larger pixels should be preferred), and a few other parameters. After identifying the parameters of the pixel grid, the colors of the pixels would be found by averaging and then clustering (to eliminate JPEG artifacts and defacements).
Initially I considered using FFT methods, but this would never work for images such as 5, 6 or 7, and ideally I want to cover them as well. Another possibility is to use the Hough transform to find sharp lines in the image and then look for regularities in the lines.
Does anyone have more ideas?
Regards, Krzysztof
New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
No virus found in this message. Checked by AVG - www.avg.com Version: 2015.0.5645 / Virus Database: 4273/8994 - Release Date: 01/24/15