본문 바로가기

전체 글

(104)
googleTest + win app driver + vs2022 vcpkg 설치 이후, PowerShell에서 gtest를 설치하고 연동하는 과정을 요약해드립니다.✅ GoogleTest 설치cd D:\tools\vcpkg.\vcpkg install gtest:x64-windows※ gtest:x64-windows → 64비트용 gtest 설치 ✅ Visual Studio 연동.\vcpkg integrate installVisual Studio 프로젝트에서 #include 바로 사용 가능자동으로 gtest.lib, gtest_main.lib 링크됨경로 추가나 링커 설정 필요 없음 ✅ 환경 구성 흐름1. vcpkg 설치 및 환경변수 설정2. PowerShell에서 `vcpkg install gtest:x64-windows`3. `vcpkg integrate instal..
GoogleTest + GoogleMock Manual Build Guide (MinGW) GoogleTest + GoogleMock Manual Build Guide (MinGW)이 문서는 Windows 환경에서 MinGW (Qt 포함) 및 PowerShell을 이용해 GoogleTest + GoogleMock을 수동으로 빌드하고 테스트 실행하는 방법을 정리한 가이드입니다.✅ 사전 준비MinGW 경로: D:/Qt/Tools/mingw1310_64/bingoogletest 소스: D:/googletest테스트 소스: D:/test.cpp1. googletest 빌드 준비cd D:/googletestmkdir buildcd build🔹 PATH에 MinGW 추가$env:PATH = "D:/Qt/Tools/mingw1310_64/bin;" + $env:PATH2. CMake로 Makefile 생..
wget 방식의 파일 다운로드 코드 (https 사용불가) #include #include #include #include #include #include #define BUFFER_SIZE 4096#define OUTPUT_FILE "downloaded_file.txt"// 오류 메시지 출력 후 종료void error_exit(const char *message) {    perror(message);    exit(EXIT_FAILURE);}// URL에서 호스트와 리소스 추출void parse_url(const char *url, char *host, char *resource) {    if (strncmp(url, "http://", 7) == 0) {        url += 7;  // "http://" 스킵    } else if (strncmp(..
hand detect & handling cube image - opencv python mediapipe pygame PyOpenGL PyOpenGL_accelerate numpy / two hands & icosahedron_vertices & fist-stop, palm-rotation import cv2import mediapipe as mpimport numpy as npimport pygamefrom pygame.locals import *from OpenGL.GL import *from OpenGL.GLU import *import mathimport random# MediaPipe 손 검출 초기화mp_hands = mp.solutions.handshands = mp_hands.Hands(static_image_mode=False, max_num_hands=2, min_detection_confidence=0.5)# OpenGL 텍스처 ID 저장texture_id = None# 3D 큐브 데이터vertices = [    [-0.5, -0.5, -0.5], [0.5, -0.5, ..
hand detect & handling cube image - opencv python mediapipe pygame PyOpenGL PyOpenGL_accelerate numpy / one hand & icosahedron_vertices import cv2import mediapipe as mpimport numpy as npimport pygamefrom pygame.locals import *from OpenGL.GL import *from OpenGL.GLU import *import mathimport random# MediaPipe 손 검출 초기화mp_hands = mp.solutions.handshands = mp_hands.Hands(static_image_mode=False, max_num_hands=1, min_detection_confidence=0.5)# OpenGL 텍스처 ID 저장texture_id = None# 3D 큐브 데이터vertices = [    [-0.5, -0.5, -0.5], [0.5, -0.5, ..
hand detect & handling cube image - opencv python mediapipe pygame PyOpenGL PyOpenGL_accelerate numpy import cv2import mediapipe as mpimport numpy as npimport pygamefrom pygame.locals import *from OpenGL.GL import *from OpenGL.GLU import *import mathimport random# MediaPipe 손 검출 초기화mp_hands = mp.solutions.handshands = mp_hands.Hands(static_image_mode=False, max_num_hands=1, min_detection_confidence=0.5)# OpenGL 텍스처 ID 저장texture_id = None# 3D 큐브 데이터vertices = [    [-0.5, -0.5, -0.5], [0.5, -0.5, ..
AR 기능 구현 - python opencv pygame opengl import cv2import numpy as npimport pygamefrom pygame.locals import *from OpenGL.GL import *from OpenGL.GLU import *# 3D 큐브 정점vertices = [    [-1, -1, -1], [1, -1, -1], [1, 1, -1], [-1, 1, -1],    [-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]]edges = [    (0, 1), (1, 2), (2, 3), (3, 0),    (4, 5), (5, 6), (6, 7), (7, 4),    (0, 4), (1, 5), (2, 6), (3, 7)]# OpenGL 텍스처 ID 저장texture_id = Nonedef in..
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 기반 객체 검출 구현# ---..