Easy Pipo
"Pipo Painting" Image Auto Creation System
Using Image Processing, the real image is automatically converted to a "Pipo Painting" image.
Our Icon
π Name : Easy Pipo
π Authors : Minku Koo Β Jiyong Park
π Development Period : Feb.2021 ~ Jun.2021
π Main Library : OpenCV, numpy, Flask
π Keyword : "Computer Vision", "Image Processing", "OpenCV", "Pipo Painting", "Line Detection", "Color Numbering"
Process Summary
π Table of Contents
- Introduction
- What is Pipo Painting?
- How to Use?
- SW Architecture
- Working Process
- Testing Video
- Modules Development
- Patent Application
- Contact to us
π€ What is Pipo Painting?
"Pipo Painting" is also called "Paint by Number" or "Painting by Numbers".
It is a kit having a board on which light markings to indicate areas to paint, and each area has a number and a corresponding numbered paint to use. The kits come with little compartmentalised boxes where the numbered colour pigments are stored. The users are encouraged to wash the paintbrush every time a new numbered colour is being used.
π Wikipedia Description
π Amazon Products
π Coupang Products
β How to Use?
Command Line
git clone https://github.com/AutoPipo/EasyPipo.git
cd EasyPipo
pip install -r requirements.txt
python .
On your Web Browser
https://localhost:5000
π₯ SW Architecture
π‘ Working Process
Original Image
Step 1. Color Clustering (8, 16, 32 Colors)
Step 2. Select appropriate number of colors and Line Drawing
Step 3. Remove noise line and Set Color Numbering (Color Label Included or Not)
π If it zoom in, you can see numbers
π½ Testing Video
here (Youtube)
You can see the Testing Videoπ Modules Development
π Painting()
Painting() converts the image like a picture through reduce color.
Use Blurring and K-Means Clustering.
This is step 1 of the Working Steps
painting = Painting( "./imagePath/image.jpg")
# Blurring
blurImage = painting.blurring( div = 8,
radius = 10,
sigmaColor =20,
medianValue=7)
# Color K-Means Clustering
clusteredImage = painting.colorClustering( blurImage, cluster = 16)
expandedImage = imageExpand(clusteredImage, size = 4)
# νμ₯λ μ΄λ―Έμ§μμ λ³νλ μμμ κ΅°μ§νλ μμκ³Ό 맀μΉ
similarMap = painting.expandImageColorMatch(expandedImage)
# κ΅°μ§νλ μμμ μ§μ λ μμκ³Ό κ°μ₯ λΉμ·ν μμμΌλ‘ 맀μΉ
paintingMap = painting.getPaintingColorMap(similarMap)
π DrawLine()
DrawLine() draw a line based on the color border.
Draw an arbitrary line at the edge of the image for apply Numbering()
This is step 2 of the Working Steps
# Input : Painted Image
drawLine = DrawLine(image)
lineMap = drawLine.getDrawLine()
lineMap = drawLine.drawOutline(lineMap)
# Output : Image drawn with lines
π Numbering()
Numbering() input the color index number inside the line.
Find the contours and its hierarchy.
Extracts the color label, calculates the Incenter point, and input a color index number.
This is step 3 of the Working Steps
# Input : Image drawn with lines
# get Color(RGB) dictionary, Color index dictionary from Painted image
colorNames, colors = getColorFromImage(image)
# Extracts Color label from Painted Image
img_lab, lab = getImgLabelFromImage(colors, image)
# Extracts contours, hierarchy, thresh from Image drawn with lines
contours, hierarchy, thresh = getContoursFromImage(lineMap)
# Make White image same size with Image drawn with lines
result_img = makeWhiteFromImage(lineMap)
# Draw contouor borders and Color index on White image
result_img = setColorNumberFromContours(result_img,
thresh,
contours,
hierarchy,
img_lab,
lab,
colorNames)
# Draw Color label index on Result image
result_img2 = setColorLabel(result_img.copy(), colorNames, colors)
# Output : Pipo Painting Canvas Image