Skip to content

Maetel/ImageTextifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Textifier

  • Row1 : Low resolution, Row2 : Medium resolution
  • Left : source, Middle : Derivative, Right : Binarized lena_low lena_mid

Create an image made with texts out of an image.
This small toy is to study python.

Dependency:

OpenCV (Probably any version will fit)

Example:

from ImageTextifier import ImageTextifier
import cv2

def simple_example():
  textifier = ITEX.ImageTextifier()
  result_text, result_image = textifier.textify(cv2.imread("img_path.jpg"))
  • For more options, refer to full_function_example() in example.py

Generating dataset

  1. Prepare alphabets, numbers, and characters
  2. Make those as a set of binary images

Process (ImageTextifier.py)

  1. Preprocess : Source(wid * hi) to gray, blur, canny
  2. Begin comparing
    • Divide ROI mask into blocks(Higher blocks means higher resolution)
    • Compare each block with pre-maid text images, and choose one with the highest score
  3. Return
    • texts
    • an image with texts on it

TODO

  • Make the result look better

Things I've learned

  • Python environment setup using Conda
  • Basic OpenCV & NumPy
  • Basic multiprocess module & Timer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages