Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maliha-tasnim/image-subset-analyzer

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.
https://github.com/maliha-tasnim/image-subset-analyzer

cpp image-analysis image-comparison image-subset-detection jpeg libjpeg-turbo

Last synced: about 14 hours ago
JSON representation

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.

Awesome Lists containing this project

README

        

## 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](https://libjpeg-turbo.org/).

## 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).

3. 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.

4. Run the Program:

./main

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