본문 바로가기

분류 전체보기

(104)
Figma convert to HTML/CSS
Figma convert to QML (qtbridge)
appium, python, android, 테스트 자동화 import refrom appium import webdriverfrom appium.options.common.base import AppiumOptionsfrom appium.webdriver.common.appiumby import AppiumByimport xml.etree.ElementTree as ETfrom time import sleepoptions = AppiumOptions()options.load_capabilities({    "platformName": "Android",    "appium:deviceName": "R3CM70GSHPB",    "appium:automationName": "UiAutomator2",    "appium:ensureWebviewsHavePages..
googletest VSCODE C/C++ //main.cpp#include // 덧셈 함수int add(int a, int b) {    return a + b;}int main() {    int num1, num2;    std::cout "Enter the first number: ";    std::cin >> num1;    std::cout "Enter the second number: ";    std::cin >> num2;    int sum = add(num1, num2);    std::cout "The sum is: " sum std::endl;    return 0;}//test.cpp#include // 덧셈 함수int add(int a, int b) {    return a + b;}// 테스트 케이스TEST..
optical flow - python, opencv 추상화 및 디자인패턴 적용 import cv2import numpy as npimport tracebackfrom abc import ABC, abstractmethod# ---------------------------# 추상 클래스: 객체 검출# ---------------------------# **디자인 패턴**: 템플릿 메서드 패턴# ObjectDetector는 객체 검출 알고리즘의 공통 인터페이스를 정의하며, # 세부 구현은 하위 클래스에서 수행하도록 설계되었습니다.class ObjectDetector(ABC):    @abstractmethod    def detect_objects(self, frame):        pass# ---------------------------# YOLO 기반 객체 검출 구현# --..
optical flow - python, opencv, 추상화 클래스 추가 구현 from abc import ABC, abstractmethod # type: ignoreimport cv2import numpy as np# ---------------------------# 추상 클래스: 객체 검출# ---------------------------class ObjectDetector(ABC):    @abstractmethod    def detect_objects(self, frame):        pass# ---------------------------# YOLO 기반 객체 검출 구현# ---------------------------class YOLOProcessor(ObjectDetector):    def __init__(self, config_path, weight..
optical flow - opencv & python import cv2import numpy as np# YOLO 설정yolo_config = 'D:\\yolov4-tiny.cfg'yolo_weights = 'D:\\yolov4-tiny.weights'yolo_classes = 'D:\\coco.names'with open(yolo_classes, 'r') as f:    classes = [line.strip() for line in f.readlines()]net = cv2.dnn.readNet(yolo_weights, yolo_config)net.setPreferableBackend(cv2.dnn.DNN_BACKEND_OPENCV)net.setPreferableTarget(cv2.dnn.DNN_TARGET_CPU)# 동영상 파일 경로video_pat..
[linux] ffmpeg mp4 player Continuous //Debian GNU/Linux 12 (bookworm)"//sudo apt update//sudo apt install libavcodec-dev libavformat-dev libavutil-dev libsdl2-dev libswscale-dev//g++ -o video_player video_player.cpp -lavformat -lavcodec -lavutil -lswscale -lSDL2 -lX11 -lvdpau -ldrm -lopus -lz -lva -lva-drm -lva-x11 -lvpx -lx264 -lx265 -lfdk-aac -lswresample#include #include #include #include #include extern "C" {    #include     #i..