Skip to content

OldGameRise/Telegram-Bot-Image-Thresholding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Telegram Image Thresholding Bot

A lightweight Telegram bot that applies adaptive thresholding to images using OpenCV—perfect for turning photos into clean, high-contrast binary images.

✨ Features

  • Accepts photos via Telegram
  • Converts to grayscale, enhances contrast, and applies adaptive thresholding
  • Returns the processed image instantly
  • Auto-cleans temporary files

🛠️ Requirements

  • Python 3.7+
  • Libraries: python-telegram-bot, opencv-python

Install with:

pip install python-telegram-bot opencv-python

⚙️ Setup

  1. Create a bot with BotFather and get your token.
  2. Replace "Your telegram bot token" in the script with your actual token.
  3. Run the bot:
python TelegramCV2_threshholding.py
  1. Send an image to your bot on Telegram!

📄 License

MIT License — free to use, modify, and share.

About

This Telegram bot uses OpenCV to automatically preprocess and apply adaptive thresholding to images sent by users. It's ideal for converting photographs or scans into high-contrast, binary-style images—useful for tasks like document enhancement or OCR preparation.

Resources

License

Stars

Watchers

Forks

Contributors

Languages