久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='QTFaG'></small><noframes id='QTFaG'>

      • <bdo id='QTFaG'></bdo><ul id='QTFaG'></ul>

    1. <legend id='QTFaG'><style id='QTFaG'><dir id='QTFaG'><q id='QTFaG'></q></dir></style></legend>
        <i id='QTFaG'><tr id='QTFaG'><dt id='QTFaG'><q id='QTFaG'><span id='QTFaG'><b id='QTFaG'><form id='QTFaG'><ins id='QTFaG'></ins><ul id='QTFaG'></ul><sub id='QTFaG'></sub></form><legend id='QTFaG'></legend><bdo id='QTFaG'><pre id='QTFaG'><center id='QTFaG'></center></pre></bdo></b><th id='QTFaG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='QTFaG'><tfoot id='QTFaG'></tfoot><dl id='QTFaG'><fieldset id='QTFaG'></fieldset></dl></div>
        <tfoot id='QTFaG'></tfoot>

        將 OpenCV 網絡攝像頭集成到 Kivy 用戶界面中

        Integrate OpenCV webcam into a Kivy user interface(將 OpenCV 網絡攝像頭集成到 Kivy 用戶界面中)
        <i id='xhj8h'><tr id='xhj8h'><dt id='xhj8h'><q id='xhj8h'><span id='xhj8h'><b id='xhj8h'><form id='xhj8h'><ins id='xhj8h'></ins><ul id='xhj8h'></ul><sub id='xhj8h'></sub></form><legend id='xhj8h'></legend><bdo id='xhj8h'><pre id='xhj8h'><center id='xhj8h'></center></pre></bdo></b><th id='xhj8h'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xhj8h'><tfoot id='xhj8h'></tfoot><dl id='xhj8h'><fieldset id='xhj8h'></fieldset></dl></div>
        <legend id='xhj8h'><style id='xhj8h'><dir id='xhj8h'><q id='xhj8h'></q></dir></style></legend>
              <tbody id='xhj8h'></tbody>
              <bdo id='xhj8h'></bdo><ul id='xhj8h'></ul>

                <small id='xhj8h'></small><noframes id='xhj8h'>

                1. <tfoot id='xhj8h'></tfoot>

                2. 本文介紹了將 OpenCV 網絡攝像頭集成到 Kivy 用戶界面中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我當前的程序是 Python 并使用 OpenCV.我依靠網絡攝像頭捕獲,并且正在處理每個捕獲的幀:

                  My current program is in Python and uses OpenCV. I rely on webcam captures and I am processing every captured frame:

                  import cv2
                  
                  # use the webcam
                  cap = cv2.VideoCapture(0)
                  while True:
                      # read a frame from the webcam
                      ret, img = cap.read()
                      # transform image
                  

                  我想制作一個帶有按鈕的 Kivy 界面(或其他圖形用戶界面),同時通過網絡攝像頭捕獲現有功能.

                  I would like to make a Kivy interface (or another graphical user interface) with buttons, keeping already existing functionality with webcam captures.

                  我找到了這個例子:https://kivy.org/docs/examples/gen__camera__main__py.html— 但它沒有解釋如何獲取網絡攝像頭圖像以使用 OpenCV 對其進行處理.

                  I found this example: https://kivy.org/docs/examples/gen__camera__main__py.html — but it doesn’t explain how to acquire the webcam image to process it with OpenCV.

                  我找到了一個較舊的示例:http://thezestyblogfarmer.blogspot.it/2013/10/kivy-python-script-for-capturing.html— 它使用屏幕截圖"功能將屏幕截圖保存到磁盤.然后我可以讀取保存的文件并進行處理,但這似乎是不必要的步驟.

                  I found an older example: http://thezestyblogfarmer.blogspot.it/2013/10/kivy-python-script-for-capturing.html — it saves screenshots to disk using the ‘screenshot’ function. Then I can read the saved files and process them, but this seems to be an unnecessary step.

                  我還能嘗試什么?

                  推薦答案

                  在這里找到這個例子:https://groups.google.com/forum/#!topic/kivy-users/N18DmblNWb0

                  它將 opencv 捕獲轉換為 kivy 紋理,因此您可以在將其顯示到您的 kivy 界面之前進行各種 cv 轉換.

                  It converts the opencv captures to kivy textures, so you can do every kind of cv transformations before displaying it to your kivy interface.

                  __author__ = 'bunkus'
                  from kivy.app import App
                  from kivy.uix.widget import Widget
                  from kivy.uix.boxlayout import BoxLayout
                  from kivy.uix.image import Image
                  from kivy.clock import Clock
                  from kivy.graphics.texture import Texture
                  
                  import cv2
                  
                  class CamApp(App):
                  
                      def build(self):
                          self.img1=Image()
                          layout = BoxLayout()
                          layout.add_widget(self.img1)
                          #opencv2 stuffs
                          self.capture = cv2.VideoCapture(0)
                          cv2.namedWindow("CV2 Image")
                          Clock.schedule_interval(self.update, 1.0/33.0)
                          return layout
                  
                      def update(self, dt):
                          # display image from cam in opencv window
                          ret, frame = self.capture.read()
                          cv2.imshow("CV2 Image", frame)
                          # convert it to texture
                          buf1 = cv2.flip(frame, 0)
                          buf = buf1.tostring()
                          texture1 = Texture.create(size=(frame.shape[1], frame.shape[0]), colorfmt='bgr') 
                          #if working on RASPBERRY PI, use colorfmt='rgba' here instead, but stick with "bgr" in blit_buffer. 
                          texture1.blit_buffer(buf, colorfmt='bgr', bufferfmt='ubyte')
                          # display image from the texture
                          self.img1.texture = texture1
                  
                  if __name__ == '__main__':
                      CamApp().run()
                      cv2.destroyAllWindows()
                  

                  這篇關于將 OpenCV 網絡攝像頭集成到 Kivy 用戶界面中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                      • <bdo id='3qXs8'></bdo><ul id='3qXs8'></ul>

                            <i id='3qXs8'><tr id='3qXs8'><dt id='3qXs8'><q id='3qXs8'><span id='3qXs8'><b id='3qXs8'><form id='3qXs8'><ins id='3qXs8'></ins><ul id='3qXs8'></ul><sub id='3qXs8'></sub></form><legend id='3qXs8'></legend><bdo id='3qXs8'><pre id='3qXs8'><center id='3qXs8'></center></pre></bdo></b><th id='3qXs8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3qXs8'><tfoot id='3qXs8'></tfoot><dl id='3qXs8'><fieldset id='3qXs8'></fieldset></dl></div>
                              <tbody id='3qXs8'></tbody>

                            <tfoot id='3qXs8'></tfoot><legend id='3qXs8'><style id='3qXs8'><dir id='3qXs8'><q id='3qXs8'></q></dir></style></legend>

                            <small id='3qXs8'></small><noframes id='3qXs8'>

                            主站蜘蛛池模板: 美日韩视频 | 日韩中文一区 | 免费在线一区二区 | 成人精品视频免费 | 国产日韩一区二区三免费高清 | 成人国产a | 在线国产99 | 中文字幕1区2区3区 日韩在线视频免费观看 | 国产精品视频一二三区 | 伊人网在线综合 | 国产又色又爽又黄又免费 | 国产69久久精品成人看动漫 | 日本三级电影在线免费观看 | 在线国产小视频 | 欧美成人精品一区二区男人看 | 久久久精品网站 | 日日草夜夜草 | 精品1区2区3区 | 一区二区三区高清 | 亚洲精品中文字幕中文字幕 | 久久久久久免费精品一区二区三区 | 亚洲色在线视频 | 精品亚洲一区二区 | 亚洲三级在线 | 有码一区 | 91成人免费 | 日韩精品在线视频 | 7777奇米影视 | 国产电影一区二区在线观看 | 人操人人| 伊人春色成人 | 97免费在线视频 | 日本福利在线观看 | 日韩中文字幕一区二区 | 亚洲视频在线观看 | 日韩在线免费 | 精品亚洲永久免费精品 | 中文字幕第一页在线 | 亚洲精品久久久久avwww潮水 | 亚洲精品久久久久中文字幕欢迎你 | 超碰97人人人人人蜜桃 |