uvsn_flutter

UVSN Image Analyzer

A Flutter application that analyzes images to extract mean RGB values, chromaticity coordinates, and EXIF metadata, with support for various image formats including RAW files. Now with optional Python backend for enhanced RAW format support!

πŸ†• Dual Processing Modes

Features

Image Analysis

Image Input

Export Functionality

User Interface

Supported Platforms

Installation

Prerequisites

Setup

  1. Clone the repository
    git clone <repository-url>
    cd uvsn_image_analyzer
    
  2. Install dependencies
    flutter pub get
    
  3. Run the app
    # For iOS
    flutter run -d ios
       
    # For Android
    flutter run -d android
       
    # For Web
    flutter run -d chrome
    

Optional: Python API Setup

For enhanced RAW format support, set up the Python backend:

  1. Install Python dependencies
    cd api
    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
    
  2. Run the Python API
    uvicorn analyze:app --reload --port 3000
    
  3. Enable in Flutter app
    • Look for the cloud icon toggle in the app bar
    • Switch it on to use Python API processing

See DEPLOYMENT.md for full deployment instructions.

Usage

Basic Workflow

  1. Launch the app - The main screen shows an empty state with instructions
  2. Add Images - Tap the β€œAdd Images” button to select images from gallery or camera
  3. View Analysis - Each analyzed image displays:
    • Image thumbnail
    • File information (name, format, size)
    • Mean RGB values with color-coded indicators
    • EXIF metadata (if available)
  4. Export Results - Use individual export buttons or bulk export from the menu

Export Format

Individual Export

{
  "imagePath": "/path/to/image.jpg",
  "fileName": "image.jpg",
  "meanRed": 128.5,
  "meanGreen": 156.2,
  "meanBlue": 89.7,
  "exifData": {
    "Make": "Canon",
    "Model": "EOS R5",
    "DateTime": "2024:01:15 14:30:25",
    "ExposureTime": "1/125",
    "FNumber": "f/2.8",
    "ISO": "100"
  },
  "analysisDate": "2024-01-15T14:30:25.123Z",
  "fileSize": "2.5 MB",
  "imageFormat": "jpg"
}

Bulk Export

{
  "exportDate": "2024-01-15T14:30:25.123Z",
  "totalImages": 3,
  "analyses": [
    // Array of individual analysis objects
  ]
}

Technical Details

Architecture

Key Dependencies

Flutter:

Python API (Optional):

Performance Optimizations

Permissions

iOS

Android

Troubleshooting

Common Issues

  1. Permission Denied
    • Ensure app has necessary permissions
    • Check device settings for camera/photo access
  2. Unsupported Format
    • Verify image format is in supported list
    • Try converting image to JPG/PNG format
  3. Export Failed
    • Check available storage space
    • Ensure write permissions are granted
  4. Slow Performance
    • Large images may take longer to process
    • Consider resizing images before analysis

Debug Mode

flutter run --debug

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues and questions: