Skip to content

CAU-ARTECH-ARENA/Vision-Art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vision-Art

Create Vision Art included Face Tracking using opencv.

😄 Our Artwork is Here

Environment

Python (for ComputerVision)

  • IDE : anaconda3
  • python >= 3.8 with Virtual Environment

Processing (for ImageProcessing)

C# (for ComputerVision)

JavaScript (for ImageProcessing)

Getting Started

Template with basic code to help you get started quickly of this repository is located in the template folder

Python (Anaconda)

  • CV :
  1. Install Anaconda : https://www.anaconda.com/products/individual (Check your OS.)

  2. Open 'Anaconda Prompt'

(base) C:> conda create -n [env_name] python=3.8
(base) C:> activate [env_name]
([env_name]) C:> pip install opencv-python==4.5.1.48
  1. Open 'Anaconda Navigator' > Applications on [env_name] > Install and Launch Jupyter Notebook(or Spyder)

  2. Create Python3 files and Run following Code
    (fix 'haarcascade_frontalface_default.xml' file to Absolute Path)

import numpy as np
import cv2

cap = cv2.VideoCapture(0)
 
while (True):
    ret, img = cap.read()
    
    cv2.imshow('frame', img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
 
cap.release()
cv2.destroyAllWindows()
  1. Imagine and Realizae Creative Idea as your Python Code!

Processing

  1. Install IDE : https://processing.org/download/ (Check your OS.)

  2. Open IDE and Install Libraries.

  • Video
  • OpenCV for Processing
  1. Run following Code (Mouse Click!)
void setup() {
 size(400, 400);
}

void draw() {
 //background(220);
 
 noStroke();
 fill(random(0,255),random(0,255),random(0,255),20);
 
 if(mousePressed)
   circle(mouseX, mouseY, 50);
}
  1. Imagine and Realizae Creative Idea as your Processing Code!

C#

JavaScript

  1. Open WebEditor : https://editor.p5js.org/

  2. Run following Code (Mouse Click!)

function setup() {
  createCanvas(400, 400);
}

function draw() {
  //background(220);
  
  noStroke();
  fill(random(0,255),random(0,255),random(0,255),20)
  
  if(mouseIsPressed)
    circle(mouseX, mouseY, 50)
}
  1. Imagine and Realizae Creative Idea as your JavaScript Code!

Requirement

  • camera (connected with PC, or webcam)

What is OpenCV -> https://opencv.org/

Quick Setup : setupfile

Applications

Reference Image