Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.68 KB

README.md

File metadata and controls

57 lines (37 loc) · 1.68 KB

image-binarization-algorithm

이미지 전처리 품질지표(PSNR, SSIM) 최적화 알고리즘

Untitled (2)


📌 development environment

Ubuntu 18.04

Python 3.9.5


📌 pseudo code

forloop.py

  For each brightness in range(-100, 100, 10): // brightness for loop
      For each contrast in range(1, 2.1, 0.5): // contrast for loop
          For each threshold in range(50, 200, 10): // binarization threshold for loop
              For each morph in range(1, 10, 2): // morphing threshold for loop
                  Try:
                      Enhance input_image with current parameters
                      Get psnr_value, ssim_value by evaluating quality against target image

                      If psnr_value > best_psnr and ssim_value > best_ssim:
                          Increment count
                          Update best_psnr, best_ssim, best_params
                          Print result and save enhanced_image

📌 Quick Start

  1. input folder 생성 후 원본 이미지 넣어두기
  2. target folder 생성 후 원본 이미지를 가장 잘 이진화한 이미지 넣어두기 (psnr, ssim 점수 계산을 위해)
  3. output folder 생성 ( 결과 이미지 저장 )
  4. pip install -r requirements.txt
  5. python forloop.py
  6. output folder 확인

📌 Develop

image


📌 Contact

If you have any questions, please contact [email protected]