This project is a web application that solves mathematical equations from images using optical character recognition (OCR) and symbolic mathematics. It's built with Flask, OpenCV, and SymPy.
- Upload images containing mathematical equations
- Process images to extract equation text using OCR
- Parse and solve equations with step-by-step explanations
- Handle various mathematical operations including basic arithmetic, algebraic expressions, and logarithms
- Display results in a user-friendly web interface
Before you begin, ensure you have met the following requirements:
- Python 3.7+
- pip (Python package manager)
- Tesseract OCR engine installed on your system
-
Clone the repository:
git clone https://github.com/yourusername/equation-solver.git cd equation-solver -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required packages:
pip install -r requirements.txt
-
Start the Flask application:
python app.py -
Open a web browser and navigate to
http://localhost:5000 -
Upload an image containing a mathematical equation
-
The application will process the image, extract the equation, solve it, and display the results with step-by-step explanations
app.py: Main Flask application filetemplates/: Contains HTML templates for the web interfacestatic/: Contains static files (CSS, JavaScript, images)uploads/: Temporary storage for uploaded images
Contributions to this project are welcome. Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or feedback, please open an issue on the GitHub repository.