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
| enable=False | |
| ''' | |
| Reading Image | |
| ''' | |
| if enable: | |
| import cv2 | |
| img = cv2.imread("Resources/lena.png") |
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
| ''' | |
| Face Detection | |
| -> Using method used by Viola and jones (real time object detection) | |
| -> We will use lot of images with positive faces and negative faces and will train the cascade file to detect the faces | |
| -> In Open CV we dont have to actually do this we can use trained cascade file to detect things | |
| ''' | |
| import cv2 | |
| faceCascade = cv2.CascadeClassifier("Resources/haarcascade_frontalface_default.xml") | |
| img = cv2.imread("Resources/lena.png") | |
| imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) |
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
| #include <iostream> | |
| #include <map> | |
| #include <vector> | |
| using namespace std; | |
| class Snake{ | |
| int end; | |
| public: | |
| Snake() {} | |
| Snake(int anEnd) : end(anEnd) {} |
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
| /** | |
| * background.js — Smart Dark Mode Extension | |
| * | |
| * Responsibilities: | |
| * - Icon state management | |
| * - Forwarding toggle messages to active tab | |
| * - Re-injecting content script into existing tabs on install/update | |
| * - Responding to tab URL changes (re-trigger smart detection per page) | |
| */ |
OlderNewer