Giter Club home page Giter Club logo

easypipo's Introduction

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

easypipo's People

Contributors

ji-yong219 avatar minku-koo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

easypipo's Issues

Input Color Label button toggle issue

There is a bug that appears when the input color label button is pressed twice at first.
Needs to be modified so that it pops up right away even if you press it once
image

Thumbnails required for every step

We get an intermediate result image after every step.

The image, of course, has the same resolution as the final result, and is often large in size.

Loading time occurs in the process of transmitting and displaying images to the web browser at each intermediate step, which causes users to wait.

At each step, it would be nice to have an additional clone of the thumbnail image pop up in the web browser.

Users can identify the image by looking at the quickly rendered preview image, and if necessary, press the magnifying glass button to see the image in its original size.

↓ Loading images with large image size
image

Howtouse page design needs to be modified

Looking at the Howtouse page, the text size on the right is too small compared to the image on the left.
Also, the image on the left has not been updated, so it needs to be updated.
image

Need for additional numeric labels

The number labeling task has one number per contour.

This is because the corresponding logic writes numbers at the center coordinates of the largest inscribed circle inside the pure contour area excluding children.

However, there are cases where it is difficult to identify the corresponding number depending on the shape and size of the contour.

For example, on very long shaped Contours, it can be difficult to discern what the numbers are on either end.

To solve this problem, an additional algorithm is needed to write numbers inside the Contour at regular intervals.

↓ Example of needing additional colored numbers
image

Modify the whatIsPipo page design

If you look at the whatIsPipo page, the sample image is skewed to the left and is rather large. Also, since the paragraphs of the text on the right do not fit, the design of the corresponding elements needs to be modified.
image

Line is very curvy

The DrawLine module draws a line along a color-changing boundary line.

If you look at the resulting line, it looks too meandering.

The cause could not be identified whether it was simply a problem with the DrawLine module or a phenomenon occurring in the process of extending the image.

As the last step of the DrawLine, I hope the ability to refine it is added

↓ If you look at the magnified line, it is very curvy.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.