Skip to content

A C++ project that analyzes JPEG images to identify subset images. Given a set of JPEG files, this tool detects if one image is a cropped version of another, helping to identify relationships among images by comparing structural and pixel data.

License

Notifications You must be signed in to change notification settings

Maliha-Tasnim/image-subset-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project analyzes JPEG images to determine if one image is a subset of another (e.g., a cropped version). It uses libjpeg-turbo for efficient JPEG handling, reducing the image size and removing color data for faster processing. The program outputs a table showing which images are subsets of others.

Features

  1. Subset Detection: Identifies cropped images within a set of JPEG files.

  2. Efficient Comparison: Reduces image size and color data to streamline analysis.

  3. JPEG Handling with libjpeg-turbo: Leverages the high-speed library for JPEG processing.

Prerequisites

Ensure the following dependencies are installed:

    C++ Compiler (e.g., GCC, Clang)

    libjpeg-turbo: JPEG library for image handling and compression

Installing libjpeg-turbo

▪️ Ubuntu/Debian:

    sudo apt-get update
    
    sudo apt-get install libjpeg-turbo8-dev

▪️ macOS (using Homebrew):

    brew install jpeg-turbo

▪️ Windows: Download and install from libjpeg-turbo's official site.

Getting Started

  1. Clone the Repository:

     git clone https://github.com/Maliha-Tasnim/image-subset-analyzer
               
     cd image-subset-analyzer
    
  2. Compile the Project: Use the provided Makefile to compile the code:

     make
    

This will create an executable file (typically named main or image-analyzer-subset).

  1. In main.cpp:

     BWString filepath = "E:\\C++\\Images";
     
     BWString ref_file = "78771293.jpg";
    

indicate two separate elements:

a. ref_file as the Source Image: The ref_file (e.g., 78771293.jpg) serves as the reference or source image. This is the main image against which other images in the directory (filepath) are compared. Replace the ref_file (source image) with desired one.

b. filepath or Other Images as Potential Subsets: The program iterates through all other images within filepath and compares each one to ref_file (source image) to determine if any of them are subsets or cropped versions of the source image. Replace the filepath with desired location containing the subset image's folder.

  1. Run the Program:

     ./main
    

The program will output a table indicating which images are subsets of others.

About

A C++ project that analyzes JPEG images to identify subset images. Given a set of JPEG files, this tool detects if one image is a cropped version of another, helping to identify relationships among images by comparing structural and pixel data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published