Skip to content

Latest commit

 

History

History
202 lines (157 loc) · 8.11 KB

README.md

File metadata and controls

202 lines (157 loc) · 8.11 KB

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

🤔 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

You can see the Testing Video here (Youtube)

📚 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

💡 Patent Application

✔ 발명 명칭 : 피포페인팅 이미지 자동변환방법 및 이를 이용한 피포페인팅 이미지 자동변환 시스템

✔ 출원 번호 : 10-2021-0152394

✔ 출원 날짜 : 2021.11.08

📧 Contact to us