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

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

          <bdo id='OcWUJ'></bdo><ul id='OcWUJ'></ul>
      1. <small id='OcWUJ'></small><noframes id='OcWUJ'>

        通過(guò) OpenCV 的 camshift 算法控制鼠標(biāo)指針(或鼠標(biāo)的

        Controlling mouse pointer through camshift algorithm of OpenCV (or how mouse basically functions)(通過(guò) OpenCV 的 camshift 算法控制鼠標(biāo)指針(或鼠標(biāo)的基本功能))
      2. <small id='O2oyH'></small><noframes id='O2oyH'>

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

              <tbody id='O2oyH'></tbody>
                <bdo id='O2oyH'></bdo><ul id='O2oyH'></ul>
                • 本文介紹了通過(guò) OpenCV 的 camshift 算法控制鼠標(biāo)指針(或鼠標(biāo)的基本功能)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我使用 EmguCV(openCV 的包裝器)在 C# 中編寫了一個(gè)程序.該程序使用 camshift 算法跟蹤對(duì)象.圍繞對(duì)象繪制一個(gè)矩形.光標(biāo)移動(dòng)到矩形的中心.輸入來(lái)自網(wǎng)絡(luò)攝像頭.

                  I have written a program in C# using EmguCV (wrapper of openCV). The program tracks an object using camshift algorithm. A rectangle is drawn around the object. The cursor is moved by center of the rectangle. Input is taken from a webcam.

                  最初的問(wèn)題是光標(biāo)無(wú)法覆蓋整個(gè)屏幕.它的運(yùn)動(dòng)僅限于框架尺寸.所以我應(yīng)用了一個(gè)乘法因子:

                  Initially the problem was that the cursor couldn't cover the entire screen. Its movement was limited to frame size. And so i applied a multiplication factor:

                  X 方向移動(dòng)的屏幕寬度/幀寬度.

                  screenwidth/framewidth for movement in X direction.

                  Y 方向移動(dòng)的屏幕高度/幀高度

                  screenheight/frameheight for movement in Y direction

                  這樣鼠標(biāo)就可以覆蓋整個(gè)區(qū)域.但是鼠標(biāo)移動(dòng)不再流暢了.我無(wú)法指出靠近的兩個(gè)圖標(biāo).如何在覆蓋整個(gè)屏幕時(shí)使鼠標(biāo)移動(dòng)平滑,就像使用真正的鼠標(biāo)一樣?

                  With this the mouse covers entire area. But the mouse movement is not smooth any more. I am unable to point to two icons closely situated. How can I make mouse movement smooth while covering the entire screen, just as it happens with a real mouse?

                  推薦答案

                  指出明顯的一點(diǎn): 你的鼠標(biāo)實(shí)現(xiàn)的不流暢是因?yàn)?camshift 給出的矩形只是精確到一幀像素的精度,因此可能的最小移動(dòng)將屏幕大小/幀大小四舍五入到最近的屏幕像素.

                  To point out the obvious: the non-smoothness of your mouse implementation comes from the fact that the rectangle given by camshift is only accurate to the accuracy of one frame pixel, so the smallest movement possible will be screensize/framesize rounded to the nearest screen pixel.

                  如果是這種情況,可以應(yīng)用某種指針加速,就像使用真實(shí)的低質(zhì)量鼠標(biāo)時(shí)那樣(當(dāng)然,如果有數(shù)千個(gè) dpi 激光鼠標(biāo),則無(wú)需這樣的事情).基本上,光標(biāo)在屏幕上移動(dòng)的距離不是指針輸入所走的距離(在本例中為 camshift 矩形位移),而是它的一個(gè)巧妙選擇的函數(shù).因此,使用加速度函數(shù) f(x),移動(dòng)指針的步驟如下:

                  If that is the case, some kind of pointer acceleration could be applied, just like it is done when real, low-quality mice are used (of course, in case of multiple thousand dpi laser mice, there is no need for such thing). Basically, the distance the cursor moves on screen is not the distance taken by the pointer input (in this case, camshift rectangle displacement), but a cleverly chosen function of it. So, using an acceleration function f(x), the steps of moving the pointer will be like this:

                  1. 計(jì)算指針輸入位移向量,記為v.
                  2. 計(jì)算對(duì)應(yīng)的單位長(zhǎng)度向量,記為u.
                  3. 屏幕指針位移為v'=f(|v|) * u
                  1. Calculate vector of pointer input displacement, let that be denoted by v.
                  2. Calculate the corresponding unit-length vector, let that be denoted by u.
                  3. The on-screen pointer displacement is v'=f(|v|) * u

                  我會(huì)以 beta * e^(alpha * x - 1) 之類的形式選擇 f(x),其中 0 <alpha 和 0 <beta <= 1 是應(yīng)該根據(jù)經(jīng)驗(yàn)選擇的參數(shù).

                  I'd chose f(x) in a form like beta * e^(alpha * x - 1), where 0 < alpha and 0 < beta <= 1 are parameters which should be empirically chosen.

                  基本上,任何在 0 處導(dǎo)數(shù)為 1 或更少的函數(shù)都會(huì)執(zhí)行此操作(允許您使用輸入的完全準(zhǔn)確度來(lái)進(jìn)行精確的光標(biāo)移動(dòng)),隨著 x 的增加變?yōu)闊o(wú)窮大(大的移動(dòng)應(yīng)該對(duì)應(yīng)于大光標(biāo)的移動(dòng)),是單調(diào)遞增的,并且具有單調(diào)遞增的一階導(dǎo)數(shù).還需要加速函數(shù)在0時(shí)的值為0,否則會(huì)出現(xiàn)很奇怪的動(dòng)作.:)

                  Basically, any function will do it that has a derivate of 1 or less at 0 (allows you to use the full accuracy of the input for precise cursor movements), goes to infinity as x increases (large movements should correspond to large movements of the cursor), is monotonically increasing and has a monotonically increasing first derivate. It is also needed that the acceleration function has a value of 0 at 0, otherwise very strange movements will happen. :)

                  還需要 f(framewidth) = screenwidth,這樣在框架上移動(dòng)被跟蹤對(duì)象會(huì)導(dǎo)致光標(biāo)在屏幕上移動(dòng).指數(shù)公式很容易使用,但使用二次或更高次多項(xiàng)式可能會(huì)在計(jì)算上更簡(jiǎn)單,具體取決于那里的性能要求......

                  It is also desirable to have f(framewidth) = screenwidth so that moving the tracked object across the frame results in the cursor being moved across the screen. An exponential formula is quite pleasing to work with, but using a quadratic or higher degree polynomial may turn out to be computationally simpler, depending on what performance requirements are there...

                  這篇關(guān)于通過(guò) OpenCV 的 camshift 算法控制鼠標(biāo)指針(或鼠標(biāo)的基本功能)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運(yùn)行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                      1. <tfoot id='D5651'></tfoot>
                        • <bdo id='D5651'></bdo><ul id='D5651'></ul>
                          • <legend id='D5651'><style id='D5651'><dir id='D5651'><q id='D5651'></q></dir></style></legend>

                              <tbody id='D5651'></tbody>

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

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

                          • 主站蜘蛛池模板: 91久久夜色| 日韩精品1区2区3区 国产精品国产成人国产三级 | 成人在线免费观看视频 | 久草青青草 | 亚洲精品久久久9婷婷中文字幕 | 午夜在线观看视频 | 成人午夜激情 | av在线免费观看不卡 | 最新中文字幕久久 | 美女视频一区二区三区 | 国产精品福利在线观看 | 青青草av在线播放 | 欧美一区二区三区四区五区无卡码 | av中文字幕在线 | 日韩视频 中文字幕 | 91综合在线视频 | 国产成人在线一区二区 | 欧美在线一区视频 | 免费国产一区 | 免费一区二区三区 | 久久亚洲一区 | 91精品国产乱码久久久久久久久 | 久久久精品一区二区三区 | 欧美一级黄色免费看 | 中国大陆高清aⅴ毛片 | 97人人超碰| 国产一区二区在线视频 | 91精品午夜窝窝看片 | 2020天天操 | 亚洲一区视频在线播放 | 亚洲一区免费 | 国产欧美一区二区三区国产幕精品 | 久久av综合 | 国产精品视频免费看 | 国产91丝袜在线18 | 国内精品视频 | 91国在线高清视频 | 天天操夜夜爽 | 日韩 国产 在线 | 亚洲视频免费在线看 | 狠狠躁天天躁夜夜躁婷婷老牛影视 |