Skip to content

A Python-based real-time image transmission system that splits compressed images into frame-sized chunks with metadata headers. Supports manual, timer, and continuous modes with error-tolerant reconstruction. Features GUI for both transmitter and receiver, enabling secure, modular, and scalable image transfer.

Notifications You must be signed in to change notification settings

LAKSHMAN1410/Real-Time-Image-Transmission-System-Frame-Based-over-TCP-IP-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Frame-Based Image Transmission and Reception System

๐Ÿ“Œ Project Overview

This project focuses on designing and implementing a real-time image transmission and reconstruction system over a local area network (LAN) using Python socket programming.

The system captures images from a webcam (or allows manual file selection), compresses them, splits them into frame-wise chunks, and sends them across the network. Each frame carries a custom 10-byte header containing metadata like frame index, row/column position, and total frame count.

On the receiving side, the application listens for incoming data, extracts the metadata, reconstructs the full image by mapping chunks in the correct order, and fills missing frames with placeholders if needed.

Both transmitter and receiver have graphical user interfaces (GUI) built using Tkinter and ttkbootstrap, providing a simple yet powerful environment for real-time monitoring, error tracking, and logging.

This project demonstrates how low-level networking concepts can be used to build a WhatsApp-like image sharing protocol at the system level.

๐Ÿ“– Introduction

In modern digital communication, real-time image transmission plays an important role in messaging, surveillance, satellite communication, and remote sensing. Unlike normal file transfers, this project simulates how communication systems split an image into smaller frames to:

Improve reliability

Handle errors gracefully

Work under limited bandwidth

The main contributions of this project are:

Frame-based transmission protocol with metadata headers.

Real-time reconstruction with missing frame handling.

GUI interfaces for interactive visualization and control.

Extensible modular design for future use in satellite and mobile communication.

โœจ Key Features ๐Ÿ”น Transmitter Module

Captures live images from webcam or selects stored images.

Compresses images using JPEG at fixed quality (40%) for balance of size and clarity.

Splits into multiple frames (~90 bytes per chunk + 10-byte header).

Sends frames sequentially over TCP/IP sockets.

Supports three operational modes:

Manual Mode โ€“ user captures and sends images manually.

Timer-Based Mode โ€“ automated sending at scheduled intervals (e.g., every 15 min).

Continuous Mode โ€“ real-time streaming by sending frames continuously.

Frames:

image

GUI Features:

Live camera preview

Frame size adjustment (80โ€“100 bytes)

Transmission progress bar

Real-time logs of sent frames

๐Ÿ”น Receiver Module

Runs a TCP server to accept connections.

Extracts metadata from headers to reassemble frames.

Detects missing frames and replaces them with black placeholders.

Reconstructs full image using OpenCV.

GUI Features:

Live preview of last received image

Image history categorized by transmitter ID

Transmission statistics (frames received, missing frames, total size)

Logs and alerts for errors or missing data

๐Ÿ› ๏ธ Tools & Technologies

Language: Python 3.10+

Libraries:

OpenCV โ†’ image compression & decoding

NumPy โ†’ array & data handling

PIL (Pillow) โ†’ image processing

socket โ†’ TCP/IP communication

GUI Framework: Tkinter + ttkbootstrap (modern design), PAGE (for layout)

Extra Modules: threading & multiprocessing (smooth performance)

Hardware Used: Webcam (USB), LAN/Wi-Fi connection

IDE: Visual Studio Code

๐Ÿ—๏ธ System Architecture Transmitter Workflow

Capture/Select image.

Compress using JPEG encoding (quality 40%).

Convert image into byte stream.

Divide into multiple frames (each ~90 bytes + 10-byte header).

Attach metadata header with:

Frame Index

Row Index

Column Index

Total Frame Count

Reserved Padding

Send frames over socket connection.

Receiver Workflow

Start server and accept incoming frames.

Extract metadata from headers.

Reassemble frames into structured grid.

Handle missing frames by inserting placeholders.

Reconstruct full image using OpenCV.

Display reconstructed image in GUI and store in organized folders.

๐Ÿ“Š Experimental Results

Average Transmission Time: ~2.3 seconds per image (Wi-Fi)

Slightly faster using Ethernet.

Decoding Accuracy: 100% when all frames are received.

Missing Frames Handling: Black placeholders preserve structure.

GUI Latency: Minimal delay between sending and preview updates.

Auto Modes: Timer and continuous modes worked smoothly without errors.

This shows the system can reliably transmit images over LAN even with packet/frame loss.

โš ๏ธ Challenges & Limitations

Frame Loss: Network delays may drop frames; handled with placeholders but not perfect.

Fixed JPEG Quality: Only one compression level (40%); no adaptive encoding yet.

Still Images Only: No live video streaming yet.

GUI Performance: May slow with too many images in history.

Static IP Requirement: Currently designed for LAN only.

๐Ÿ”ฎ Future Enhancements

Add live video streaming support.

Integrate AES encryption for secure data transfer.

Enable cloud storage of received images.

Add mobile app for remote access.

Replace TCP with WebSocket / MQTT protocols for IoT integration.

Optimize system for satellite and underwater communication with frame size between 55โ€“110 bytes.

๐Ÿ“ฅ Installation

Install dependencies:

pip install opencv-python numpy pillow ttkbootstrap

โ–ถ๏ธ Usage Start Receiver python receiver.py

Starts TCP server

Displays reconstructed images in GUI

Start Transmitter python transmitter.py

Opens GUI

Capture/send images in manual, timer, or continuous mode

๐Ÿ“Œ Applications

WhatsApp-like image transfer at protocol level

Remote surveillance and security systems

Satellite-based data reception

Underwater monitoring and exploration

Offline image sharing in low-bandwidth environments

๐Ÿ’ปGUI Ouput

Transmitter:

image

Receiver:

image

๐Ÿ‘จโ€๐Ÿ’ป Author

Developed as part of an academic project on Real-Time Communication Systems.

About

A Python-based real-time image transmission system that splits compressed images into frame-sized chunks with metadata headers. Supports manual, timer, and continuous modes with error-tolerant reconstruction. Features GUI for both transmitter and receiver, enabling secure, modular, and scalable image transfer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages