Coder Social home page Coder Social logo

fruit_ninja-using-opencv's Introduction

Fruit Ninja Game using OpenCV

Overview

Welcome to the Fruit Ninja Game implemented using OpenCV! This project recreates the classic Fruit Ninja game, where players slice fruits that appear on the screen. The game uses computer vision techniques to detect the player's hand gestures or mouse movements to simulate the slicing action.

#Table of Contents -Features -Tech Stack -Gameplay -Installation -Usage -Contributing -License -Contact -Features

  • Gesture Detection: Use hand gestures to slice fruits (requires a webcam).
  • Mouse Control: Use the mouse as an alternative to gestures.
  • Fruit Variety: Multiple types of fruits with different slicing effects.
  • Score Tracking: Keep track of your score as you slice fruits.
  • Visual Effects: Realistic fruit slicing animations and effects.

Tech Stack

Programming Language: Python Computer Vision: OpenCV Graphics: Pygame (for rendering and animations)

Gameplay

In the game, fruits are thrown onto the screen, and the player must slice them by moving their hand (detected via a webcam) or using the mouse. The player scores points for each fruit sliced, and the game continues until a certain number of fruits are missed.

Installation

Prerequisites Python 3.6+ Webcam (for gesture detection) Setup

Clone the repository:

Copy code git clone https://github.com/your-username/fruit-ninja-opencv.git cd fruit-ninja-opencv Create a virtual environment and activate it:

Copy code

python -m venv venv source venv/bin/activate # On Windows use venv\Scripts\activate Install dependencies:

pip install -r requirements.txt Usage Run the game:

python main.py

Controls:

Gesture Mode: Use your hand gestures to slice the fruits (requires a webcam). Mouse Mode: Move the mouse to slice the fruits.

Game Objective:

Slice as many fruits as possible without missing too many. Some fruits may have special effects or bonuses. Contributing We welcome contributions! Please read our Contributing Guidelines for more details.

License

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

fruit_ninja-using-opencv's People

Contributors

rajarshidattapy avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.