• SEARCH

    통합검색
  • DIY Holic
    • Welcome
    • 자유게시판
    • 3D Printing
      • 3D 자유게시판
      • STLs
      • Pics
      • 3D Neon 제작
      • 3D 프린팅 영상
    • 미싱 놀이
      • 미싱 자유게시판
      • 사진
      • 터프팅
      • 나눔게시판
    • CNC
      • CNC 자유게시판
      • CNC PICs
    • Computer
      • S/W
      • Com 자유게시판
    • 프린트
      • 관련사진
      • 프린트 자유게시판
    • 회원가입
  • TOP VIEW

    • 한인회 싸이트 완료 그리고 요즘
      837

      한인회 싸이트 완료 했는데 ... 한지 몇달 됬는데 이제야 완료 글을 쓰네.... 일단 회장님이 너무 마음에 들어 하셨음. 예전 만든건 정말 시큰둥 하셨걸랑... 뭐 .. 솔직히 나도 마음에 안들었고... 이번꺼는 마음에 드셨던지 열심히 사람들한테 소개 하시더라.. ^^;;; 요즘 예전에 가지고 있던 띠 동물 그림으로 neon 싸인 ...

    • 싸이트 를 만든이유
      801

      그냥 나 편한데로 맘대로 할수 있는곳이 있었으면 했었다. 우연히 지금에 디자인을 접했고 너무~ 마음에 들어 호스팅 바로 신청하고 설치시작! 솔직히 처음에 호스팅 신청후 빨리 해봐서 샘플과 다르면(보통 좀 다르더라) 서비스 켄슬해야지.... 하며 ( 켄슬 시간은 일주일 ) 설치 했는데 왠걸.... 이건 너무 쉽고 이쁘쟈나....

    • 이게 뭐였드라? 01
      246

    TOP SUGGEST

    RANDOM

    • 12지신 첫번째 - 닭띠
      12지신 첫번째 - 닭띠

      12지신 네온 제작중! 레진컬러써서 샘플로 만들어 보고 있는데 원래 계획은 그냥 아웃사이드 라인만 네온 넣는거였는데 만들어 보니 아무래도 아쉬워서 업그레이드 해서 다시 만들꺼야. 사이즈도 조금더 키우고... 지금 사진에 있는건 30cm 정도 되는데 베드에 전부 들어가게 35cm 로 제작해보고 완료되면 또 올릴께~ 하나 ...

    • Stl 싸이트 리스트   h...

      Stl 싸이트 리스트 https://www.thingiverse.com/ https://cults3d.com/en https://www.printables.com/ https://www.crealitycloud.com/ https://thangs.com/?sort=trending

    • 티셔츠 프린팅 1974
      티셔츠 프린팅 1974
    추천
    1 redclip
    0
  • 3D Printing 3D 자유게시판
    • 3D Printing 3D 자유게시판
    • Implementing Face Tracking for WALL-E

    • Profile
      • redclip
      • 2025.11.29 - 02:59 2025.11.29 - 02:51 69

    🤖 Guide: Implementing Face Tracking for WALL-E

     

    This guide outlines how to enable Face Tracking on your WALL-E robot using OpenCV. This feature allows WALL-E to detect a human face and automatically rotate its head to follow the movement.

     

    1. Prerequisites

     

    Ensure that the OpenCV data files (Haar Cascades) are installed on your Raspberry Pi.

    Bash

    sudo apt install opencv-data -y
    

     

    2. Locate Data File

     

    Find the absolute path of the haarcascade_frontalface_default.xml file, as the system might not locate it automatically.

    Bash

    find /usr -name "haarcascade_frontalface_default.xml"
    # Common path: /usr/share/opencv4/haarcascades/haarcascade_frontalface_default.xml
    

     

    3. Modify Backend (app.py)

     

    Update the USBCameraStreamer class in web_interface/app.py to include the face detection and tracking logic.

     

    A. Initialization (__init__)

     

    Load the Haar Cascade model using the absolute path found in Step 2 and initialize the head position variable.

    Python

    def __init__(self):
        self.camera = cv2.VideoCapture(0)
        # Load the face detection model using the absolute path
        self.face_cascade = cv2.CascadeClassifier('/usr/share/opencv4/haarcascades/haarcascade_frontalface_default.xml')
        self.is_running = False
        self.head_pos = 50  # Initial head position (Center)
    

     

    B. Tracking Logic (get_frame)

     

    Implement the logic to detect faces and send servo commands to the Arduino.

    Python

    def get_frame(self):
        if self.is_running:
            success, frame = self.camera.read()
            if success:
                # 1. Convert to grayscale for performance
                gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
                
                # 2. Detect faces
                faces = self.face_cascade.detectMultiScale(gray, 1.1, 4)
    
                for (x, y, w, h) in faces:
                    # Draw a rectangle around the face
                    cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 2)
                    
                    # 3. Calculate the center of the face
                    x_center = x + (w / 2)
                    
                    # 4. Control Motors (Center is 320, Deadzone is 40px)
                    global arduino
                    
                    # If face is on the left -> Rotate head left (Decrease angle)
                    if x_center < 280: 
                        if self.head_pos > 0:
                            self.head_pos -= 1
                            arduino.send_command("G" + str(self.head_pos))
                            
                    # If face is on the right -> Rotate head right (Increase angle)
                    elif x_center > 360: 
                        if self.head_pos < 100:
                            self.head_pos += 1
                            arduino.send_command("G" + str(self.head_pos))
    
                ret, buffer = cv2.imencode('.jpg', frame)
                return buffer.tobytes()
        return None
    

     

    4. Run & Test

     

    Restart the WALL-E service to apply the changes.

    Bash

    sudo systemd restart walle.service
    sudo systemd status walle.service
    
    • Note: Verify that the service status is active (running).

    이 게시물을..
    0
    0
    • R2D2 - Arduino BLDC Motor Controller Wiring Guideredclip
    • Wall-E USB camera 작동시키기redclip
    • redclip 0
      redclip

    redclip 님의 최근 글

    NFC 마패 3 2026 01.27 QR-Code 공짜로 만들기 9 2026 01.22 안티 그래비티 vs 제미니 23 2026 01.18 R2D2 - Arduino BLDC Motor Controller Wiring Guide 17 2026 01.18 이게 얼마만이야.. T.T 16 2026 01.18

    redclip 님의 최근 댓글

    작성 댓글이 없습니다.
    글쓴이의 서명작성글 감추기 
    • 댓글 입력
    • 에디터 전환
    댓글 쓰기 에디터 사용하기 닫기
    • view_headline 목록
    • 14px
    • R2D2 - Arduino BLDC Motor Controller Wiring Guide
    • Wall-E USB camera 작동시키기
    • 목록
      view_headline
    × CLOSE
    기본 (3) 제목 날짜 수정 조회 댓글 추천 비추
    분류 날짜 검색
    3
    R2D2 - Arduino BLDC Motor Controller Wiring Guide
    redclip 2026.01.18 - 23:06 17
    Implementing Face Tracking for WALL-E
    redclip 2025.11.29 - 02:51 69
    1
    Wall-E USB camera 작동시키기
    redclip 2025.11.29 - 00:53 68
    • 1
    • / 1 GO
    • 글쓰기
  • 3D Printing
    • 3D 자유게시판
    • STLs
    • Pics
    • 3D Neon 제작
    • 3D 프린팅 영상

    COMMENT

    NOTICE

    • NFC 마패
    • QR-Code 공짜로 만들기
    • 안티 그래비티 vs 제미니

    COMMENT

    • Today17
    • Yesterday921
    • Total18,524
  • DIY Holic
 DIY Holic all rights reserved.
by OrangeDay