<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## 說明 借助python可以實現使用命令行完成調用電腦的攝像頭進行拍照,并將照片保存到制定文件夾,可以實現監控的目的!這部分的簡單demo如下所示: <br/> ```python #!/usr/bin/env python3 import time import datetime import pygame import pygame.camera from pygame.locals import * #初始化攝像頭 pygame.init() pygame.camera.init() camera = pygame.camera.Camera("/dev/video0",(640,480)) camera.start() def mkdir(path): # 引入模塊 import os # 去除首位空格 path=path.strip() # 去除尾部 / 符號 path=path.rstrip("/") # 判斷路徑是否存在 # 存在 True # 不存在 False isExists=os.path.exists(path) # 判斷結果 if not isExists: # 如果不存在則創建目錄 # 創建目錄操作函數 os.makedirs(path) print( path +' 創建成功') return True else: # 如果目錄存在則不創建,并提示目錄已存在 print (path+' 目錄已存在') return False # 定義要創建的目錄 now_time=datetime.datetime.now().strftime('%Y%m%d%H%M%S') mkpath="vpath-"+now_time # 調用函數 mkdir(mkpath) #獲取當前時間病格式化 frame=1 while frame < 10 : now_time=datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S') image = camera.get_image() pygame.image.save(image,mkpath+"/videos-"+now_time+".png") print(frame) frame = frame + 1 time.sleep(30) #30分鐘拍攝一張 camera.stop() ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看