DEV Community

Mate Technologies
Mate Technologies

Posted on

🎬 I Built a Python Tool to Extract Images from Videos (with OpenCV + Tkinter)

Extracting frames from videos sounds simple… until you actually need:

Custom frame intervals
Privacy protection (faces, license plates)
Clean datasets for AI or photogrammetry
A usable UI (not just scripts)

So I built a desktop tool to solve all of that.

πŸ‘‰ VID2IMG Free β€” a Python-based video-to-image extraction app with built-in anonymization and a modern UI.

πŸš€ What This Tool Does

At its core, VID2IMG uses OpenCV to process video frames and export them as images.

But I added a few features that make it more practical for real-world use:

πŸŽ₯ Frame Extraction Engine
Supports MP4, AVI, MOV
Configurable frame interval
Efficient sequential processing
if idx % frame_interval.get() == 0:
cv2.imwrite(path, frame)
πŸ”’ Anonymization (Computer Vision)

Using Haar cascades from OpenCV:

Face detection β†’ Gaussian blur
License plates β†’ pixelation
faces = face_cascade.detectMultiScale(gray, 1.2, 5)
frame[y:y+h, x:x+w] = cv2.GaussianBlur(roi, (51, 51), 0)

This makes it useful for:

Privacy-safe datasets
Street footage processing
πŸ“Έ Photogrammetry Mode

When working with tools like Meshroom or RealityCapture:

Sequential filenames (frame_000001)
Lossless PNG output
Consistent resolution
cv2.imwrite(path, frame, [cv2.IMWRITE_PNG_COMPRESSION, 0])
🌍 360° Video Safe Mode

Handles equirectangular video without breaking geometry (important for VR / 360 workflows).

πŸ–₯️ UI with Tkinter + ttkbootstrap

Instead of CLI-only, I built a full desktop UI:

Modern theme (ttkbootstrap)
Progress bar
Live logging (thread-safe)
def ui(func, *args, **kwargs):
app.after(0, lambda: func(*args, **kwargs))

Threading keeps the UI responsive while processing video.

βš™οΈ Architecture Overview
Frontend: Tkinter + ttkbootstrap
Processing: OpenCV (cv2)
Concurrency: Python threading
Packaging: PyInstaller (EXE build)
πŸ“¦ Download (Windows EXE)

I packaged it into a standalone executable:

πŸ‘‰ https://github.com/rogers-cyber/VID2IMG-Free/releases/tag/v1.0.0

No Python required β€” just run the .exe.

⚠️ Notes on Distribution

Since this is packaged with PyInstaller:

Windows SmartScreen may warn (unsigned EXE)
Some antivirus tools may flag it (false positive)

This is expected for indie-built tools.

πŸ“’ Why This Version Has Ads

To keep the tool free, I added:

Small rotating banner ads
No tracking
No background processes

It’s a simple way to support development without paywalls.

πŸ’Ž Pro Version

I also built a Pro version (no ads) with a cleaner experience and future upgrades.

πŸ‘‰ https://matetools.gumroad.com

🧠 Use Cases

This tool is useful for:

AI / ML dataset generation
Privacy-compliant video processing
Drone / action camera workflows
3D reconstruction pipelines
πŸ› οΈ Tech Stack
Python
OpenCV
Tkinter
ttkbootstrap
Pillow
πŸ”₯ Lessons Learned

A few interesting takeaways while building this:

Thread-safe UI updates in Tkinter are critical
OpenCV Haar cascades are still useful for lightweight detection
Packaging Python apps for Windows is harder than expected
Small UX details (like logs + progress bars) matter a lot
⭐ Final Thoughts

This started as a personal utility, but turned into a full tool others can use.

If you're working with video processing or datasets, give it a try.

Feedback is welcome β€” I’m planning more features soon πŸš€

Thanks for reading πŸ™Œ

Top comments (0)