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
(opencv-latest) $ python -V | |
Python 3.8.13 | |
(opencv-latest) $ python -c 'import cv2; print(cv2.getBuildInformation())' | |
General configuration for OpenCV 4.6.0 ===================================== | |
Version control: 4.6.0 | |
Platform: | |
Timestamp: 2022-06-07T10:22:17Z | |
Host: Darwin 20.2.0 arm64 |
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 numpy as np | |
import cv2 | |
def update(image, args): | |
print("Scale: " + str(args)) | |
fontFace = cv2.FONT_HERSHEY_SIMPLEX | |
pixelHeight = int(image.shape[0] * args / 100) | |
thickness = 1 | |
org = (0, pixelHeight) |
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
def worddle(length: int, word_list: list[str], skip_characters:str='', present_characters:str='', fixed_characters: dict[int, str]={}, returns=False): | |
"""Summary | |
Parameters | |
---------- | |
length : int | |
Length of the word in the problem | |
word_list : list[str] | |
List of dictionary words | |
skip_characters : str |
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 "opencv2/core.hpp" | |
#include "opencv2/imgproc.hpp" | |
#include "opencv2/highgui.hpp" | |
#include "opencv2/videoio.hpp" | |
#include <iostream> | |
using namespace cv; | |
using namespace std; | |
void drawText(Mat & image); |
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, ctypes, csv, io | |
capture = cv2.VideoCapture(0, cv2.CAP_GPHOTO2) | |
print(capture.isOpened()) | |
camera_data = ctypes.c_char_p(int(capture.get(cv2.CAP_PROP_GPHOTO2_WIDGET_ENUMERATE))).value.decode('utf-8') | |
headers = ['id', 'label', 'name', 'info', 'readonly', 'type', 'value'] | |
canon_info = [{k:v for k, v in dictionary.items() if k in headers} for dictionary in csv.DictReader(io.StringIO(camera_data))] |