• SEARCH

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

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

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

    • 싸이트 를 만든이유
      885

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

    • 알씨
      507

      사진 사이즈 변경할때 내가 많이 쓰는 알씨 프로그램이야. 서버에서 다운받으면 크지도 않은 파일이 오래 걸려서 아예 여기에 올려놓는거니까 필요한 사람 다운받아써.. 크렉버전 아니니까 광고 나올꺼야 참고해~ ALSee939.exe <---- 클릭

    TOP SUGGEST

    RANDOM

    • neon frame print 1
    • 욕심?

      Wall-E 완성하고 나니까 자꾸만 R2D2 가 눈에 밟힌다. 파일을 구해서 열라 많고 복잡한 걸 하나씩 찾아서 다운로드 하고는 있는데..... 이건 라이프사이즈 인데.... 이거 만드는게 맞을까? 으아......... 일단 파일은 다 준비 해놓고 고민하까나.. ^^;;;

    • 건담 RX-78 Classic 1
      건담 RX-78 Classic 1

      다운로드 : 건담104-rx-78-classic-by_toymakr3d.zip 참고: 프린트 할때 새워서 프린트 되는거는 왠만하면 따로 프린트 하기를 추천.. fail 나는경우가 좀 있음. 그리고 brim 옵션 켜주는거 강추 ( 플레이트에 붙어있다가 크기 커지면 쓰러지는경우가 있음 )

    댓글

    대상을 찾을 수 없습니다.

  • 3D Printing 3D 자유게시판
    • 3D Printing 3D 자유게시판
    • Wall-E USB camera 작동시키기

    • Profile
      • redclip
      • 2025.11.29 - 01:27 2025.11.29 - 00:53 219

    🛠️ Guide: Enabling USB Camera Support for WALL-E

     

    This guide outlines the steps to replace the default PiCamera module with a USB Webcam using OpenCV in the WALL-E Flask web interface. ( by Gemini )

     

    1. Prerequisites

     

    First, install the OpenCV library for Python on your Raspberry Pi.

    Bash

    sudo apt update
    sudo apt install python3-opencv
    

     

    2. Modify Backend (app.py)

     

    We need to update the Python Flask server to capture frames from the USB camera.

    A. Import OpenCV and Response Add cv2 and Response to the imports at the top of the file.

    Python

    from flask import Flask, ..., Response  # Add Response
    import cv2                              # Add cv2
    

    B. Add Camera Class Insert the USBCameraStreamer class before the app = Flask(__name__) line.

    Python

    class USBCameraStreamer:
        def __init__(self):
            self.camera = cv2.VideoCapture(0) # 0 is usually the default USB camera
            self.is_running = False
    
        def start_stream(self):
            if not self.camera.isOpened():
                self.camera.open(0)
            self.is_running = True
            return True, "USB Camera Started"
    
        def stop_stream(self):
            self.is_running = False
            if self.camera.isOpened():
                self.camera.release()
            return True
    
        def is_stream_active(self):
            return self.is_running
    
        def get_frame(self):
            if self.is_running:
                success, frame = self.camera.read()
                if success:
                    ret, buffer = cv2.imencode('.jpg', frame)
                    return buffer.tobytes()
            return None
    

    C. Initialize Camera Replace the existing PiCameraStreamer initialization with our new class (around line 34).

    Python

    # camera: PiCameraStreamer = PiCameraStreamer()  <-- Comment this out
    camera = USBCameraStreamer()                     # <-- Add this
    

    D. Add Video Route Add the generator function and route at the bottom of the file (before if __name__ == ...).

    Python

    def gen(camera):
        while True:
            frame = camera.get_frame()
            if frame is not None:
                yield (b'--frame\r\n'
                       b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n')
            else:
                 time.sleep(0.1)
    
    @app.route('/video_feed')
    def video_feed():
        return Response(gen(camera),
                        mimetype='multipart/x-mixed-replace; boundary=frame')
    

     

    3. Modify Frontend (index.html)

     

    Update the HTML to load the video from our new route.

    • File: web_interface/templates/index.html

    • Action: Find the <img> tag with id="stream" and change the src attribute.

    HTML

    <img id="stream" src="{{ url_for('static', filename='streamimage.jpg') }}">
    
    <img id="stream" src="{{ url_for('video_feed') }}">
    

     

    4. Update Logic (main.js)

     

    Prevent the JavaScript from overwriting the camera URL with the old port 8080 address.

    • File: web_interface/static/js/main.js

    • Action: Search for $("#stream").attr("src", ...) and replace the URL in two places (inside sendSettings function and window.onload section).

    JavaScript

    // Replace this logic in both locations:
    $("#stream").attr("src", "/video_feed");
    

     

    5. Run

     

    Restart the service to apply changes.

    Bash

    sudo systemd stop walle.service
    python3 app.py
    

    이 매뉴얼이 나중에 도움이 되길 바랍니다! 📝

     

    Attached file
    app.py 26.7KB 16
    이 게시물을..
    0
    0
    • Implementing Face Tracking for WALL-Eredclip
    • redclip 0
      redclip

    redclip 님의 최근 글

    R2D2 를 품기에는 우리집이 너무작아..ㅜ.ㅜ 43 2026 02.21 dControl 162 2026 02.11 NFC 명함 마패 66 2026 02.05 NFC 마패 89 2026 01.27 QR-Code 공짜로 만들기 141 2026 01.22

    redclip 님의 최근 댓글

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

    COMMENT

    NOTICE

    • R2D2 를 품기에는 우리집이 너무작아..ㅜ.ㅜ
    • dControl
    • NFC 명함 마패

    COMMENT

    • Today112
    • Yesterday119
    • Total29,215
  • DIY Holic
 DIY Holic all rights reserved.
by OrangeDay