This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| import sqlite3 | |
| #faceDetect=cv2.CascadeClassifier('haarcascade_frontalface_default.xml'); | |
| faceDetect = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml') | |
| cam=cv2.VideoCapture(0); | |
| def insertOrUpdate(Id,Name,Age,Gen,CR): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install opencv-python | |
| pip install opencv-python-headless | |
| pip install opencv-contrib-python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sqlite3 | |
| from sqlite3 import Error | |
| def create_connection(db_file): | |
| """ create a database connection to a SQLite database """ | |
| conn = None | |
| try: | |
| conn = sqlite3.connect(db_file) | |
| print(sqlite3.version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sqlite3 | |
| from sqlite3 import Error | |
| def create_connection(db_file): | |
| """ create a database connection to the SQLite database | |
| specified by db_file | |
| :param db_file: database file | |
| :return: Connection object or None | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| import sqlite3 | |
| #faceDetect=cv2.CascadeClassifier('haarcascade_frontalface_default.xml'); | |
| faceDetect = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml') | |
| cam=cv2.VideoCapture(0); | |
| def insertOrUpdate(Id,Name,Age,Gen,CR): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import cv2 | |
| import numpy as np | |
| from PIL import Image | |
| #recognizer=cv2.createLBPHFaceRecognizer(); | |
| recognizer = cv2.face.LBPHFaceRecognizer_create() | |
| path='dataSet' | |
| def getImagesWithID(path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| import sqlite3 | |
| #faceDetect=cv2.CascadeClassifier('haarcascade_frontalface_default.xml'); | |
| faceDetect = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml') | |
| cam=cv2.VideoCapture(0); | |
| #rec=cv2.createLBPHFaceRecognizer(); | |
| rec = cv2.face.LBPHFaceRecognizer_create() | |
| rec.read("recognizer/trainningData.yml") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python3 createdb.py | |
| python3 createtable.py | |
| python3 facedata.py | |
| python3 facetrain.py | |
| python3 facerecognisation.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.os.Handler; | |
| public class LrcPosition { | |
| Handler handler = new Handler(); | |
| handler.postDelayed(runnable, 1000); | |
| Runnable runnable = new Runnable() { | |
| public void run() { | |
| int currentPosition = player.getCurrentPosition; | |
| for(int a=0; a<rowList.length; a++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ArrayList<LrcRow> rowsList = new ArrayList<>(); | |
| LrcRow lrcRow1 = new LrcRow(timestamp(00:21:73), Ni lakk tera patla jea, 00:21:73) | |
| LrcRow lrcRow2 = new LrcRow(timestamp(00:23.69), Patla jea, 00:23.69) | |
| LrcRow lrcRow3 = new LrcRow(timestamp(00:25.19), Ni lakk tera patla jea, 00:25.19) | |
| ……….. | |
| ………. | |
| ……. | |
| rowsList.add(row1) | |
| rowsList.add(row2) | |
| rowsList.add(row3) |