Extract and analyze the dominant colors from any image using OpenCV and React.
Check out the deployed app on Netlify:
👉 OpenCV Image Processor
- Extracts dominant colors from images using k-means clustering.
- Lets you choose the number of dominant colors to extract.
- Fast, intuitive, and user-friendly interface.
- All processing happens in your browser—no images are uploaded to any server.
Requirements: Node.js and npm.
git clone https://github.com/borjantona/opencv-image-dominant-colors.git
cd opencv-image-dominant-colors
npm install
npm run dev
- Open the app in your browser.
- Upload an image from your device.
- Select how many dominant colors you want to extract.
- Instantly see the generated color palette.
Here are some examples of processed images and their extracted color palettes:
📷 |
---|
![]() |
![]() |
![]() |
- OpenCV: Computer vision algorithms.
- React: User interface.
- Vite: Fast frontend build tool.
- Vitest: Testing framework.
Contributions are welcome!
Feel free to open an issue or submit a pull request for suggestions or improvements.