Skip to content

MATLAB-based GUI for handwriting analysis using image processing, supporting custom feature extraction scripts.

Notifications You must be signed in to change notification settings

zayedrmdn/Handwriting-Feature-Extraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Handwriting Feature Extraction GUI

A MATLAB-based GUI for handwriting analysis, allowing users to upload handwriting images, apply multiple feature extraction scripts, and classify handwriting styles (print, cursive, etc.).

📌 Features

Baseline Consistency Analysis
Slant Angle Detection
Letter Spacing Measurement
Stroke Continuity Evaluation
Expandable with Custom Scripts


📥 Cloning the Repository

Using GitHub Desktop:

  1. Open GitHub Desktop.
  2. Go to FileClone Repository.
  3. Select "URL" and enter: https://github.com/zayedrmdn/Handwriting-Feature-Extraction.git
  4. Choose a folder to store the project.
  5. Click "Clone" and wait for the process to finish.

Using Git Bash or Terminal:

https://github.com/zayedrmdn/Handwriting-Feature-Extraction.git

📂 Project Structure

📁 Handwriting-Feature-Extraction
│── 📂 src/                  # MATLAB feature extraction scripts
│── 📂 test_images/          # Sample handwriting images
│── 📄 main_gui.mlapp        # MATLAB App Designer GUI
│── 📄 README.md             # Documentation
│── 📄 log.txt               # Log file for analysis results

🚀 Running the GUI

📌 Prerequisites

  1. Ensure MATLAB is installed.
  2. Install the Image Processing Toolbox.

📌 Steps to Run

  1. Open MATLAB.
  2. Navigate to the cloned folder:
cd 'C:\path\to\Handwriting-Feature-Extraction'
  1. Run the GUI:
main_gui
  1. Usage:
    • Upload a handwriting image.
    • Select a handwriting style.
    • Pick up to 3 features.
    • Click "Run Analysis".

🛠️ Adding Custom Feature Extraction Scripts

1️⃣ Create a New Script

  • Place it inside the /src/ folder.
  • Ensure the function name matches the script filename.

📌 Example (example_detection.m):

function result = example_detection(imagePath)
    % Load image
    img = imread(imagePath);
    
    % Perform some analysis (Example: Count black pixels)
    blackPixels = sum(img(:) == 0);
    
    % Return structured results
    result = struct('BlackPixelCount', blackPixels, 'Type', 'Custom Analysis');
end

2️⃣ Register the New Script in the GUI

Modify RunAnalysisButtonPushed.m inside main_gui.mlapp.

➡️ Step 1: Update the script list
Find the scriptMap definition and update it like this:

📌 Before adding the new script:

scriptMap = containers.Map( ...
    {'Baseline Detection', 'Slant Detection', 'Letter Spacing', 'Stroke Continuity'}, ...
    {@baseline_detection, @slant_detection, @space_detection, @stroke_detection} ...
);

📌 After adding example_detection.m:

scriptMap = containers.Map( ...
    {'Baseline Detection', 'Slant Detection', 'Letter Spacing', 'Stroke Continuity', 'Example Detection'}, ...
    {@baseline_detection, @slant_detection, @space_detection, @stroke_detection, @example_detection} ...
);

➡️ Step 2: Update Dropdown List
Inside createComponents(), update the dropdown menu:

app.SelectFeature1DropDown.Items = {'Baseline Detection', 'Slant Detection', 'Letter Spacing', 'Stroke Continuity', 'Custom Feature'};

🔄 Updating & Contributing

📌 Create Your Own Branch

  • Open GitHub Desktop.
  • Click Branch → New Branch.
  • Name your branch (e.g., feature-name) and click Create Branch.

📌 Contributing

  • Make changes in MATLAB.
  • Open GitHub Desktop.
  • Under Changes, enter a commit message.
  • Click Commit to [your-branch-name].
  • Click Push origin to upload your changes.
  • Open GitHub and create a Pull Request.

About

MATLAB-based GUI for handwriting analysis using image processing, supporting custom feature extraction scripts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages