영상처리
조회수 : 1
파이썬_opencv_패키지_설치   ( 12/15 )
OpenCV 카메라 영상처리 예제 (2/4) 1.while True:2.    # 카메라에서 프레임 읽기3.    ret, frame = camera.read()4.    if not ret:5.        print("프레임을 가져올 없습니다.")6.        break7.    # 이미지 그레이스케일로 변환 (Canny 경계선 추출을 위해)8.    gray_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)9.    # Canny 경계선 추출10.    edges = cv2.Canny(gray_frame, 100, 200)11.    # FPS 계산12.    frame_count += 113.    elapsed_time = time.time() - start_time14. fps = frame_count / elapsed_time