TW202145957A - Motion detection method and device, electronic equipment and computer readable storage medium - Google Patents

Motion detection method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
TW202145957A
TW202145957A TW110110400A TW110110400A TW202145957A TW 202145957 A TW202145957 A TW 202145957A TW 110110400 A TW110110400 A TW 110110400A TW 110110400 A TW110110400 A TW 110110400A TW 202145957 A TW202145957 A TW 202145957A
Authority
TW
Taiwan
Prior art keywords
picture frame
calibration element
detection
tracking
motion detection
Prior art date
Application number
TW110110400A
Other languages
Chinese (zh)
Other versions
TWI778552B (en
Inventor
焦旭
Original Assignee
焦旭
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 焦旭 filed Critical 焦旭
Publication of TW202145957A publication Critical patent/TW202145957A/en
Application granted granted Critical
Publication of TWI778552B publication Critical patent/TWI778552B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/23Recognition of whole body movements, e.g. for sport training
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)
  • Burglar Alarm Systems (AREA)

Abstract

The invention relates to a motion detection method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: photographing the motion of a detected person, forming a picture frame sequence, and enabling the detected person to wear a calibration assembly; detecting the calibration component in the picture frame sequence to obtain position information of the calibration component; tracking the calibration component in the sequence of picture frames according to a tracking algorithm; and measuring the moving distance of the calibration assembly. According to the motion detection method and device, the electronic equipment and the computer readable storage medium, more accurate and faster target detection, tracking and measurement can be realized.

Description

運動檢測方法和裝置、電子設備以及內儲程式之電腦可讀取記錄媒體Motion detection method and device, electronic device, and computer-readable recording medium with stored program

本發明屬於檢測設備領域,具體涉及一種運動檢測方法和裝置、電子設備以及內儲程式之電腦可讀取記錄媒體。The invention belongs to the field of detection equipment, and in particular relates to a motion detection method and device, an electronic device and a computer-readable recording medium with stored programs.

測距存在於人類生活的方方面面,對人類的進步與發展有著非常重要的作用,而人類的社會發展又促進了測距技術的發展與完善。隨著人類社會的發展,測距從最原始的估測到測量工具的產生再到近現代高科技測量儀器的誕生,測距技術的理論已趨向完備。有關距離的測量方法很多,從是否接觸層次上可以分為兩種:接觸式測量和非接觸式測量。非接觸式測量無須與被測表面接觸,一般通過光學、電氣學、影像學等技術獲取最終測量距離。接觸式測量測距精度高、穩定性好,但由於受到體積、品質、安裝條件、結構以及操作不方便等因素影響而得不到廣泛利用;非接觸式測量雖然測量精度以及穩定性上不及接觸式測量,但具有自動化程度高、測量速度快、信息量豐富、動態範圍大等優勢而逐漸受到人們的重視,特別是在現在技術的高速發展下,測量精度以及穩定性上非接觸式測量已趨近於接觸式測量。非接觸式測量中使用普遍的一種方法是圖像測量。圖像測量就是通過圖像獲取設備獲取圖像,然後利用影像處理技術對圖像進行相關處理獲取最終測距結果的一種測量方法。該方法對測量工具和被測物體沒有特殊要求,比較適合應用于傳統接觸式測量無法實施的場合。Ranging exists in all aspects of human life and plays a very important role in the progress and development of human beings, and the social development of human beings promotes the development and improvement of ranging technology. With the development of human society, ranging from the most primitive estimation to the generation of measuring tools to the birth of modern high-tech measuring instruments, the theory of ranging technology has tended to be complete. There are many methods of measuring distance, which can be divided into two types from the level of contact: contact measurement and non-contact measurement. Non-contact measurement does not need to be in contact with the surface to be measured, and the final measurement distance is generally obtained through optical, electrical, imaging and other technologies. Contact measurement has high ranging accuracy and good stability, but it is not widely used due to factors such as volume, quality, installation conditions, structure, and inconvenient operation; although non-contact measurement is less accurate and stable than contact measurement However, it has the advantages of high degree of automation, fast measurement speed, rich information, and large dynamic range, and has gradually attracted people's attention. Especially with the rapid development of technology, non-contact measurement in terms of measurement accuracy and stability has been Approaching contact measurement. A common method used in non-contact measurement is image measurement. Image measurement is a measurement method that acquires an image through an image acquisition device, and then uses image processing technology to correlate the image to obtain the final ranging result. This method has no special requirements for measuring tools and objects to be measured, and is more suitable for applications where traditional contact measurement cannot be implemented.

測距可以應用到生活的各個方面,尤其在人體運動場景時,往往需要對身體運動進行檢測、跟蹤和測量,例如,心肺復蘇操作檢測的場景的檢測、跟蹤和測量,還包含健身、康復等各種肢體運動的場景的檢測、跟蹤和測,例如,體育運動打分(體操等)、健身(例如原地快速蹬踏,檢測其頻率拐點)、康復、身體運用機能測量、舞蹈、拉琴(如小提琴)、打鼓等。Ranging can be applied to all aspects of life, especially in human motion scenarios, it is often necessary to detect, track and measure body movements. Detection, tracking and measurement of limb movement scenes, such as sports scoring (gymnastics, etc.), fitness (such as fast pedaling in place, detection of its frequency inflection point), rehabilitation, measurement of body function, dancing, playing the piano (such as violin) ), drumming, etc.

現有技術中雖然存在一些運動檢測的系統和方法,但是,這些運動檢測系統和方法的精度和速度有待進一步提升。Although there are some motion detection systems and methods in the prior art, the accuracy and speed of these motion detection systems and methods need to be further improved.

本發明提供一種運動檢測方法和裝置、電子設備以及內儲程式之電腦可讀取記錄媒體,能夠進一步提升運動檢測的精度和速度,並且所提供的方法和裝置能夠應用與各種運動檢測的場景。The present invention provides a motion detection method and device, an electronic device, and a computer-readable recording medium with stored programs, which can further improve the accuracy and speed of motion detection, and the provided method and device can be applied to various motion detection scenarios.

根據本發明的第一方面,提供一種運動檢測方法,其包含:According to a first aspect of the present invention, a motion detection method is provided, comprising:

拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴一標定元件;Photograph the motion of the detected person to form a picture frame sequence, the detected person wears a calibration element;

對該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊;Detecting the calibration element in the picture frame sequence to obtain position information of the calibration element;

根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件;以及tracking the calibration element in the sequence of picture frames according to a tracking algorithm; and

測定該標定元件的移動距離。Measure the moving distance of the calibration element.

根據本發明的第二方面,提供一種運動檢測裝置,其包含:According to a second aspect of the present invention, a motion detection device is provided, comprising:

一拍攝模組,用於拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴一標定元件;a photographing module for photographing the movement of the subject to form a picture frame sequence, the subject wearing a calibration element;

一檢測模組,用於對該該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊;a detection module for detecting the calibration element in the picture frame sequence to obtain position information of the calibration element;

一跟蹤模組,用於根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件;以及a tracking module for tracking the calibration element in the sequence of picture frames according to a tracking algorithm; and

一測定模組,用於測定該標定元件的移動距離。A measuring module is used for measuring the moving distance of the calibration element.

根據本申請的協力廠商面,提供了一種電子設備,包含: 處理器;According to the third party aspect of the present application, an electronic device is provided, comprising: processor;

記憶體,存儲有該電腦程式,當該電腦程式被該處理器執行時,使得該處理器執行第一方面所述的運動檢測方法。The memory stores the computer program. When the computer program is executed by the processor, the processor executes the motion detection method described in the first aspect.

根據本申請的第四方面,提供了一種內儲程式之電腦可讀取記錄媒體,其上存儲有電腦可讀指令,當該指令被一處理器執行時,使得該處理器執行第一方面所述的運動檢測方法。According to a fourth aspect of the present application, there is provided a computer-readable recording medium storing a program, on which computer-readable instructions are stored, and when the instructions are executed by a processor, the processor executes the first aspect. The described motion detection method.

根據本發明的運動檢測方法和裝置、電子設備以及內儲程式之電腦可讀取記錄媒體,通過運動目標檢測過程,通過檢測目標顏色且處於運動的物體,能夠大致識別標記元件的位置,在經過膨脹侵蝕和連通域篩選處理後,還能夠去除圖片中的雜訊和干擾,然後通過邊緣檢測並將所提取的邊緣進行對應的變換,能夠精確識別該標記元件,並獲取該標記元件的位置資訊。最後,在獲取標記的位置資訊後再進行跟蹤和距離測量。本發明的運動檢測裝置能夠實現更精確和更快速的目標檢測、跟蹤和測量。According to the motion detection method and device, the electronic device and the computer-readable recording medium with the stored program according to the present invention, the position of the marking element can be roughly identified by detecting the color of the target and the moving object through the moving target detection process. After dilation erosion and connected domain screening processing, it can also remove noise and interference in the picture, and then through edge detection and corresponding transformation of the extracted edge, the marker element can be accurately identified and the location information of the marker element can be obtained. . Finally, tracking and distance measurements are performed after obtaining the location information of the markers. The motion detection device of the present invention can realize more precise and faster target detection, tracking and measurement.

在下文中,僅簡單地描述了某些示例性實施例。正如本領域技術人員可認識到的那樣,在不脫離本發明的精神或範圍的情況下,可通過各種不同方式修改所描述的實施例。因此,附圖和描述被認為本質上是示例性的而非限制性的。In the following, only certain exemplary embodiments are briefly described. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature and not restrictive.

在本發明的描述中,需要理解的是,術語"中心"、"縱向"、"橫向"、"長度"、"寬度"、"厚度"、"上"、"下"、"前"、"後"、"左"、"右"、"堅直"、"水準"、"頂"、"底"、"內"、"外"、"順時針"、"逆時針"等指示的方位或位置關係為基於附圖所示的方位或位置關係,僅是為了便於描述本發明和簡化描述,而不是指示或暗示所指的裝置或元件必須具有特定的方位、以特定的方位構造和操作,因此不能理解為對本發明的限制。此外,術語"第一"、"第二"僅用於描述目的,而不能理解為指示或暗示相對重要性或者隱含指明所指示的技術特徵的數量。由此,限定有"第一"、"第二"的特徵可以明示或者隱含地包含一個或者更多個所述特徵。在本發明的描述中,"多個"的含義是兩個或兩個以上,除非另有明確具體的限定。In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "top", "bottom", "front", " Rear", "Left", "Right", "Straight", "Level", "Top", "Bottom", "Inside", "Outside", "Clockwise", "Counterclockwise" etc. The positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, features defined as "first", "second" may expressly or implicitly include one or more of said features. In the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.

在本發明的描述中,需要說明的是,除非另有明確的規定和限定,術語"安裝"、"相連"、"連接"應做廣義理解,例如,可以是固定連接,也可以是可拆卸連接,或一體地連接:可以是機械連接,也可以是電連接或可以相互通訊;可以是直接相連,也可以通過中間媒介間接相連,可以是兩個元件內部的連通或兩個元件的相互作用關係。對於本領域的普通技術人員而言,可以根據具體情況理解上述術語在本發明中的具體含義。In the description of the present invention, it should be noted that, unless otherwise expressly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection Connection, or integral connection: it can be a mechanical connection, an electrical connection or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal communication of two elements or the interaction of two elements relation. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

在本發明中,除非另有明確的規定和限定,第一特徵在第二特徵之"上"或之"下"可以包含第一和第二特徵直接接觸,也可以包含第一和第二特徵不是直接接觸而是通過它們之間的另外的特徵接觸。而且,第一特徵在第二特徵"之上"、"上方"和"上面"包含第一特徵在第二特徵正上方和斜上方,或僅僅表示第一特徵水準高度高於第二特徵。第一特徵在第二特徵"之下"、"下方"和"下面"包含第一特徵在第二特徵正上方和斜上方,或僅僅表示第一特徵水準高度小於第二特徵。In the present invention, unless otherwise expressly specified and limited, a first feature "on" or "under" a second feature may include the first and second features in direct contact, or may include the first and second features Not directly but through additional features between them. Also, the first feature being "above", "over" and "over" the second feature includes that the first feature is directly above and obliquely above the second feature, or simply means that the first feature level is higher than the second feature. The first feature is "below", "below" and "below" the second feature includes the first feature is directly above and diagonally above the second feature, or simply means that the first feature level is less than the second feature.

下文的公開提供了許多不同的實施方式或例子用來實現本發明的不同結構。為了簡化本發明的公開,下文中對特定例子的部件和設置進行描述。當然,它們僅僅為示例,並且目的不在於限制本發明。此外,本發明可以在不同例子中重複參考數位和/或參考字母,這種重複是為了簡化和清楚的目的,其本身不指示所討論各種實施方式和/或設置之間的關係。此外,本發明提供了的各種特定的工藝和材料的例子,但是本領域普通技術人員可以意識到其他工藝的應用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, they are only examples and are not intended to limit the invention. Furthermore, the present disclosure may repeat reference numerals and/or reference letters in different instances, such repetition is for the purpose of simplicity and clarity and does not in itself indicate a relationship between the various embodiments and/or arrangements discussed. In addition, the present disclosure provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the application of other processes and/or the use of other materials.

以下結合附圖對本發明的優選實施例進行說明,應當理解,此處所描述的優選實施例僅用於說明和解釋本發明,並不用於限定本發明。The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, but not to limit the present invention.

如第1圖所示,本發明的實施例提供一種運動檢測輔助系統。該運動檢測輔助系統包含一標定元件100和一檢測終端支架400,該運動檢測輔助系統與該檢測終端200配合,可檢測運動過程中的參數。該檢測終端200可以為手機、iPad等智慧設備。根據本公開一可選的技術方案,該檢測終端200包含攝像頭、處理模組和通信模組,並可通過數據網絡連接伺服器300,進行資料交換。As shown in FIG. 1, an embodiment of the present invention provides a motion detection assistance system. The motion detection assistance system includes a calibration element 100 and a detection terminal support 400 , and the motion detection assistance system cooperates with the detection terminal 200 to detect parameters in the process of motion. The detection terminal 200 may be a smart device such as a mobile phone and an iPad. According to an optional technical solution of the present disclosure, the detection terminal 200 includes a camera, a processing module and a communication module, and can be connected to the server 300 through a data network for data exchange.

如第2圖所示,運動檢測用的標定元件100包含一固定部件101和一標記部件102。進行運動時,該固定部件101用於將該標定元件100固定於運動者的手腕部、腿、腰上等。該標記部件102設置於該固定部件101上,並形成為具有預定尺寸參數的圖形,作為光學信標,便於在該標定元件100的視頻圖像中進行識別,例如,該標記部件102可以是一種LOGO。該標記部件102包含自發光結構及/或反光結構。As shown in FIG. 2 , the calibration element 100 for motion detection includes a fixing part 101 and a marking part 102 . When exercising, the fixing component 101 is used to fix the calibration element 100 on the wrist, leg, waist and the like of the athlete. The marking part 102 is arranged on the fixing part 101, and is formed as a figure with predetermined size parameters as an optical beacon, which is convenient for identification in the video image of the marking element 100, for example, the marking part 102 can be a kind of logo. The marking member 102 includes a self-luminous structure and/or a reflective structure.

該標記部件102形成的圖形及圖形的尺寸預先存儲於該檢測終端中,便該於檢測終端進行後續的處理。本實施例中,該標記部件102形成的圖形為圓形,圓形的直徑是確定的,將圓形的直徑預先存儲於該檢測終端中。另一種方案中,該標記部件102的圖形可為矩形或正方形,將矩形或正方形的邊長預先存儲於該檢測終端中。該標記部件102的圖形也可以為其他特定的形狀,具有確定的尺寸即可。The graphics and the size of the graphics formed by the marking component 102 are pre-stored in the detection terminal, so that the detection terminal can perform subsequent processing. In this embodiment, the figure formed by the marking part 102 is a circle, the diameter of the circle is determined, and the diameter of the circle is pre-stored in the detection terminal. In another solution, the shape of the marking component 102 may be a rectangle or a square, and the side lengths of the rectangle or square are pre-stored in the detection terminal. The graphics of the marking component 102 may also be in other specific shapes, and only need to have a certain size.

根據本發明一個可選的技術方案,該標記部件102的數量為多個,在該固定部件101上依次設置,便於對該標定元件100的空間姿態進行識別。多個標記部件102還可設置為不同的顏色,提高空間姿態識別的準確性。According to an optional technical solution of the present invention, the number of the marking parts 102 is multiple, and they are arranged on the fixing part 101 in sequence, so as to facilitate the identification of the spatial posture of the calibration element 100 . The plurality of marking components 102 can also be set to different colors to improve the accuracy of spatial gesture recognition.

該標定元件100可以為手環,將手環戴在運動人員的手腕上。該標定元件100也可以為手錶或護臂套等可相對手臂進行固定的設備。例如,在進行心肺復蘇時,該標定元件100優選地用於佩戴於手腕處,因為這種情況下手環的移動距離與手掌的移動距離之間的誤差最小。The calibration element 100 can be a wristband, and the wristband is worn on the wrist of an athlete. The calibration element 100 can also be a device that can be fixed relative to the arm, such as a watch or an arm guard. For example, when performing cardiopulmonary resuscitation, the calibration element 100 is preferably used to be worn on the wrist, because in this case the error between the movement distance of the bracelet and the movement distance of the palm is minimal.

在根據第1圖所示的系統中,該檢測終端200對運動的過程進行拍攝。影響測距精度的因素很多,其中,硬體因素的影響可以通過選取高解析度的CCD(Charge Coupled Device,電荷耦合器件)攝像機、高採樣頻率的圖像採集卡等高品質硬體,降低各種環境因素的限制。因為該檢測終端(例如,手機)的款式不同,通過軟體演算法來提高系統測距精度的方法是相對最有效的途徑。該檢測終端200在對運動的過程進行拍攝,獲得視頻輸入。為了對該標定元件100進行目標檢測、目標跟蹤和距離測量,首先需要將視頻輸入轉換為單幀圖片,使得視頻輸入成為圖片幀序列。在一個可選的實施例中,為了通過簡單高效的方式提取目標,將RGB(Red Green Blue,紅綠藍)顏色空間轉換為HSV(Hue, Saturation, Value,色調、飽和度、明度)顏色空間,便於顏色的篩選和提取。相比正常圖片所使用的RGB顏色空間,HSV顏色空間的描述方式更接近人的肉眼的識別方式,可以更好的描述顏色和亮度的情況。另外,由於目標背景的複雜化,存在顏色豐富後,進行分割出現多個目標,導致圖像存在無法定位和角點檢測錯誤的情況,可以將HSV空間模型的H為用圓周表示。In the system according to FIG. 1, the detection terminal 200 photographs the process of movement. There are many factors that affect the accuracy of ranging. Among them, the influence of hardware factors can be reduced by selecting high-quality hardware such as high-resolution CCD (Charge Coupled Device) cameras and high-sampling frequency image acquisition cards. Limitations of environmental factors. Because the styles of the detection terminals (eg, mobile phones) are different, the method of improving the ranging accuracy of the system through software algorithms is relatively the most effective way. The detection terminal 200 obtains video input during the process of photographing the movement. In order to perform target detection, target tracking and distance measurement on the calibration element 100, it is first necessary to convert the video input into a single-frame picture, so that the video input becomes a sequence of picture frames. In an optional embodiment, in order to extract the target in a simple and efficient way, convert the RGB (Red Green Blue) color space to the HSV (Hue, Saturation, Value, Hue, Saturation, Lightness) color space , which is convenient for color screening and extraction. Compared with the RGB color space used by normal pictures, the description method of the HSV color space is closer to the recognition method of the human eye, and can better describe the color and brightness. In addition, due to the complexity of the target background, after the color is rich, there are multiple targets in the segmentation, resulting in the inability to locate the image and the corner detection error. The H of the HSV space model can be represented by a circle.

根據本發明的一個方面,提供一種運動檢測方法。如第3圖所示,該方法包含如下步驟:According to one aspect of the present invention, a motion detection method is provided. As shown in Figure 3, the method includes the following steps:

步驟S31,拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴標定元件。In step S31, the motion of the detected person is photographed to form a picture frame sequence, and the detected person wears the calibration element.

被檢測者佩戴標定元件,該標定元件可以為手環、腳環等。在被檢測者佩戴該標定元件後,該檢測終端可以拍攝被檢測者的運動,形成視頻輸入,然後將視頻輸入轉換為圖片幀序列,形成該圖片幀序列。The detected person wears a calibration element, which can be a wristband, a foot ring, or the like. After the detected person wears the calibration element, the detection terminal can photograph the motion of the detected person to form a video input, and then convert the video input into a picture frame sequence to form the picture frame sequence.

步驟S32,對該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊。In step S32, the calibration element in the picture frame sequence is detected, and the position information of the calibration element is obtained.

在將視頻輸入轉換為該圖片幀序列後,首先需要識別圖片中該標定元件的位置,在獲取該標定位置的位置資訊後,才便於後續對該標定元件的跟蹤以及根據跟蹤後的結果對該標定元件移動距離的測量。在第4~6圖中將會對步驟S32進行更詳細的描述。After converting the video input into the picture frame sequence, it is first necessary to identify the position of the calibration component in the picture. After obtaining the position information of the calibration position, it is convenient for subsequent tracking of the calibration component and the tracking result according to the tracking result. A measure of the distance traveled by the calibration element. Step S32 will be described in more detail in FIGS. 4-6.

步驟S33,根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件。Step S33, tracking the calibration element in the picture frame sequence according to a tracking algorithm.

為了保證測距的速度,需要對該標定元件進行目標檢測並進行跟蹤。在通過步驟S32獲得該標定元件的位置資訊後,由於該標定元件處於運動的狀態,需要保持該對標定元件的跟蹤。通過該跟蹤演算法,保證在目標在僅僅有微弱形變且快速移動的時候保證良好的跟蹤效果,能夠提取出該標定元件移動的軌跡。In order to ensure the speed of ranging, it is necessary to perform target detection and tracking on the calibration element. After the position information of the calibration element is obtained through step S32, since the calibration element is in a state of movement, the tracking of the pair of calibration elements needs to be maintained. Through the tracking algorithm, it is ensured that a good tracking effect is ensured when the target only has weak deformation and moves rapidly, and the trajectory of the movement of the calibration element can be extracted.

在一個優選的實施例中,該跟蹤演算法可以包含KCF演算法(Kernel Correlation Filter,核相關濾波演算法)。KCF演算法具有如下優點:實現簡潔、效果好、速度快。通過迴圈矩陣位移產生大量樣本來解決問題,並且通過離散傅裡葉變換的推導,在頻域計算速度極快。在缺少樣本的情況下,通過簡單的方法檢測,連接核運算進行跟蹤,保證了跟蹤的泛化能力。In a preferred embodiment, the tracking algorithm may include a KCF algorithm (Kernel Correlation Filter, kernel correlation filter algorithm). The KCF algorithm has the following advantages: simple implementation, good effect and fast speed. The problem is solved by generating a large number of samples through the displacement of the loop matrix, and by the derivation of the discrete Fourier transform, the calculation speed is extremely fast in the frequency domain. In the case of lack of samples, a simple method is used to detect and connect kernel operations to track, which ensures the generalization ability of tracking.

步驟S34,測定該標定元件的移動距離。Step S34, measuring the moving distance of the calibration element.

首先,該檢測終端200預先知道該標定元件100上的標記部件102的預定尺寸,並在捕捉到該標記部件102後,獲知該標記部件102所佔用的像素值。然後,在跟蹤該標定元件的過程中,提取該標定元件運動過程中的極值點的位置資訊,該極值點的位置資訊包含上下運動的最上位置時的位置資訊以及最下位置的位置資訊,或者包含左右運動的最左位置時的位置資訊以及最右位置的位置資訊,當然,該極值點的位置資訊還可以包含其他運動極限位置的資訊。通過取該標定元件運動過程中的極值點的位置資訊,獲知該標定元件運動過程中所佔用的像素值,然後依據該標記部件102的尺寸以及該標記部件102所佔用的像素值,獲得該標定元件的運動距離。在第7~8圖中將會對步驟S32進行更詳細的描述。First, the detection terminal 200 knows the predetermined size of the marking part 102 on the calibration element 100 in advance, and after capturing the marking part 102 , knows the pixel value occupied by the marking part 102 . Then, in the process of tracking the calibration element, the position information of the extreme point during the movement of the calibration element is extracted, and the position information of the extreme point includes the position information of the uppermost position and the position information of the lowermost position of the up and down movement , or include the position information of the leftmost position and the position information of the rightmost position of the left and right movement. Of course, the position information of the extreme point may also include information of other extreme positions of the movement. By taking the position information of the extreme point during the movement of the calibration element, the pixel value occupied during the movement of the calibration element is obtained, and then according to the size of the marking part 102 and the pixel value occupied by the marking part 102, the pixel value occupied by the marking part 102 is obtained. The movement distance of the calibration element. Step S32 will be described in more detail in FIGS. 7-8.

第4圖是根據本發明一個實施例的第3圖所示的步驟S32的流程圖。如第4圖所示,步驟S32包含如下子步驟:FIG. 4 is a flowchart of step S32 shown in FIG. 3 according to an embodiment of the present invention. As shown in Figure 4, step S32 includes the following sub-steps:

子步驟S41,對該圖片幀序列進行運動目標檢測。In sub-step S41, moving object detection is performed on the picture frame sequence.

運動目標檢測用於提取圖片幀中標定元件的資訊。運動目標檢測演算法有很多種,包含背景減除法、光流法和幀差法。在一個優選的實施例中,採用幀差法實施運動目標檢測。其中,採用幀差法實施運動目標檢測如第5~6圖所示,下文將會進行詳細介紹。Moving object detection is used to extract the information of the target element in the picture frame. There are many kinds of moving target detection algorithms, including background subtraction, optical flow and frame difference. In a preferred embodiment, a frame difference method is used to implement moving object detection. Among them, the frame difference method is used to implement moving target detection as shown in Figures 5 to 6, which will be described in detail below.

在一個可選的實施例中,為了減少計算量,步驟S32還可以包含如下子步驟:In an optional embodiment, in order to reduce the amount of calculation, step S32 may further include the following sub-steps:

子步驟S42,對該運動目標檢測後的結果進行二值化處理。In sub-step S42, binarization processing is performed on the result of the moving object detection.

通過二值化處理,濾除掉多餘資訊,將顏色資訊處理為黑和白,能夠大大減少計算量。Through binarization, redundant information is filtered out, and color information is processed into black and white, which can greatly reduce the amount of calculation.

在另一個可選的實施例中,為了減少濾除掉除了該標定元件外的小面積的雜訊干擾,步驟S32還可以包含如下子步驟:In another optional embodiment, in order to reduce and filter out small-area noise interference except the calibration element, step S32 may further include the following sub-steps:

子步驟S43,對二值化處理後的結果進行膨脹侵蝕處理;以及Sub-step S43, performing dilation erosion processing on the binarized result; and

子步驟S44,對膨脹侵蝕後的結果進行連通域篩選處理。In sub-step S44, the connected domain screening process is performed on the result after expansion and erosion.

其中,可以設置合適的膨脹侵蝕的大小,也可以設置連通域篩選的面積,例如,篩選掉小於300像素的連通域。在完成運動目標檢測的篩選後,可以在圖片幀中大致得到感興趣的目標,包含該標記元件,但是仍然不能排除掉一小部分的干擾。因此,將根據該標記元件的邊緣特徵來識別標記元件的具體位置。從而,步驟S32包含:Among them, an appropriate size of dilation erosion can be set, and an area of connected domain screening can also be set, for example, a connected domain less than 300 pixels can be filtered out. After completing the screening of moving object detection, the object of interest can be roughly obtained in the picture frame, including the marker element, but still a small part of the interference cannot be excluded. Therefore, the specific location of the marker element will be identified based on the edge features of the marker element. Thus, step S32 includes:

子步驟S45,將該運動目標檢測的結果進行邊緣檢測處理,在邊緣檢測處理過程中,所提取的邊緣包含該標定元件的邊緣。In sub-step S45, edge detection processing is performed on the result of the moving object detection. During the edge detection processing, the extracted edge includes the edge of the calibration element.

在一個具體的實施例中,進行邊緣檢測的演算法包含canny演算法。In a specific embodiment, the algorithm for edge detection includes a canny algorithm.

在進行邊緣檢測處理後,所提取的邊緣包含該標定元件的邊緣,也可能包含不是該標定元件的其他物體的邊緣。從而,為了更精確確定標定元件的位置,步驟S32包含:After the edge detection process is performed, the extracted edge includes the edge of the calibration element, and may also include the edge of other objects that are not the calibration element. Therefore, in order to more accurately determine the position of the calibration element, step S32 includes:

子步驟S46,根據該標定元件的預設形狀,將所提取的邊緣進行對應的變換,從而獲取該標定元件的該位置資訊。Sub-step S46, according to the preset shape of the calibration element, correspondingly transform the extracted edge, so as to obtain the position information of the calibration element.

例如,該標定元件為手環,那麼其預設形狀為矩形,可以通過相應的轉換演算法,例如,霍夫轉換,提取矩形的各個直線段,從而確定所提取的邊緣為手環的邊緣。更為具體地,設定一個直線段的數量的閾值,例如2或3,當經過霍夫轉換提取的直線段的數量大於等於該閾值時,可以確認該邊緣為矩形的邊緣,即檢測到手環的邊緣。For example, if the calibration element is a wristband, then its preset shape is a rectangle, and each straight line segment of the rectangle can be extracted through a corresponding transformation algorithm, such as Hough transform, so as to determine that the extracted edge is the edge of the wristband. More specifically, set a threshold for the number of straight line segments, such as 2 or 3. When the number of straight line segments extracted by Hough transform is greater than or equal to the threshold, it can be confirmed that the edge is a rectangular edge, that is, the wristband is detected. edge.

再如,如果編輯元件的預設形狀為圓形或橢圓,可以通過相應的轉換演算法,例如,另一種霍夫轉換,提取圓形或橢圓形,從而確定所提取的邊緣為標記元件的邊緣或邊緣的組成部分。For another example, if the preset shape of the editing element is a circle or an ellipse, a corresponding transformation algorithm, such as another Hough transformation, can be used to extract a circle or an ellipse, so as to determine that the extracted edge is the edge of the marking element. or edge components.

在提取標定元件的邊緣或邊緣的組成部分時,根據霍夫變換標定元件的預設形狀的特點,設置對應的轉換演算法,提取出霍夫變換標定元件的邊緣或邊緣的組成部分,對於採用什麼樣的轉換演算法,本發明不做限定,只要該轉換演算法能夠提取並確定標定元件的邊緣即可。When extracting the edge or edge component of the calibration component, set the corresponding conversion algorithm according to the characteristics of the preset shape of the Hough transform calibration component, and extract the edge or edge component of the Hough transform calibration component. What kind of conversion algorithm is not limited in the present invention, as long as the conversion algorithm can extract and determine the edge of the calibration element.

在獲取變換演算法標記元件的邊緣後,就能夠知道變換演算法標記元件的位置資訊。例如,變換演算法標記元件為手環,可以以座標[X,Y,H,W]表示手環的位置,在一個具體實施例中,X和Y分別表示手環矩形的左上角頂點的橫坐標和縱坐標,而H和W分別表示手環矩形的高度和寬度。After acquiring the edge of the component marked by the transformation algorithm, the position information of the component marked by the transformation algorithm can be known. For example, the transformation algorithm marks the component as a wristband, and the position of the wristband can be represented by the coordinates [X, Y, H, W]. In a specific embodiment, X and Y respectively represent the horizontal direction of the upper left corner of the wristband rectangle. Coordinates and vertical coordinates, while H and W represent the height and width of the bracelet rectangle, respectively.

第5圖是根據本發明一個實施例的運動目標檢測的流程圖。對於視頻輸入的圖片幀序列,選擇其中的兩個相鄰的圖片幀(這兩個圖片幀優選的為圖片幀序列的前兩個相鄰的圖片幀)進行運動目標檢測。該運動目標檢測流程包含:FIG. 5 is a flowchart of moving object detection according to an embodiment of the present invention. For the picture frame sequence of video input, two adjacent picture frames (preferably the first two adjacent picture frames of the picture frame sequence) are selected for moving object detection. The moving target detection process includes:

步驟S51,獲取該圖片幀序列中的相鄰的一第一圖片幀和一第二圖片幀。Step S51 , acquiring a first picture frame and a second picture frame adjacent to each other in the picture frame sequence.

步驟S52,從該第一圖片幀和該第二圖片幀中分別提取目標顏色。Step S52, extract the target color from the first picture frame and the second picture frame respectively.

目標顏色是標記元件的顏色,提取目標顏色是為了便於對標記元件的檢測。目標顏色優選與人體膚色、衣著以及視頻背景均不同的顏色,例如,紅色或綠色等。The target color is the color of the marking element, and the target color is extracted to facilitate the detection of the marking element. The target color is preferably a color different from human skin color, clothing, and video background, such as red or green, etc.

步驟S53,將該第一圖片幀和該第二圖片幀中提取目標顏色進行差分,獲得運動目標檢測的結果。In step S53, the target color extracted from the first picture frame and the second picture frame is differentiated to obtain a moving target detection result.

第6圖是根據本發明另一個實施例的運動目標檢測的流程圖。與第5圖不同的是,對於視頻輸入的圖片幀序列,選擇其中的三個相鄰的圖片幀(這三個圖片幀優選的為圖片幀序列的前三個相鄰的圖片幀)進行運動目標檢測。該運動目標檢測流程包含:FIG. 6 is a flowchart of moving object detection according to another embodiment of the present invention. The difference from Figure 5 is that, for the picture frame sequence input by the video, three adjacent picture frames (these three picture frames are preferably the first three adjacent picture frames of the picture frame sequence) are selected for motion. Target Detection. The moving target detection process includes:

步驟S61,獲取該圖片幀序列中的相鄰的一第一圖片幀、一第二圖片幀和一第三圖片幀。Step S61, acquiring a first picture frame, a second picture frame, and a third picture frame adjacent to each other in the picture frame sequence.

步驟S62,從該第一圖片幀、第二圖片幀和第三圖片幀中分別提取目標顏色。Step S62, extract the target color from the first picture frame, the second picture frame and the third picture frame respectively.

目標顏色是標記元件的顏色,提取目標顏色是為了便於對標記元件的檢測。目標顏色優選與人體膚色、衣著以及視頻背景均不同的顏色,例如,紅色或綠色等。The target color is the color of the marking element, and the target color is extracted to facilitate the detection of the marking element. The target color is preferably a color different from human skin color, clothing, and video background, such as red or green, etc.

步驟S63,將該第一圖片幀和該第二圖片幀中提取的目標顏色進行差分,獲得一第一差分結果。Step S63: Differentiate the target color extracted from the first picture frame and the second picture frame to obtain a first difference result.

步驟S64,將該第二圖片幀和該第三圖片幀中提取的目標顏色進行差分,獲得一第二差分結果。In step S64, the target color extracted from the second picture frame and the third picture frame is differentiated to obtain a second difference result.

其中,對步驟S63和步驟S64執行的順序沒有限定,步驟S63可以在步驟S64之前執行,也可以在步驟S64之後執行,還可以與步驟S64同時執行。The order in which steps S63 and S64 are performed is not limited, and step S63 may be performed before step S64, may be performed after step S64, or may be performed simultaneously with step S64.

步驟S65,將該第一差分結果與該第二差分結果取交集,獲得運動目標檢測的結果。Step S65, taking the intersection of the first difference result and the second difference result to obtain a moving target detection result.

第6圖所示的運動目標檢測過程相對第5圖能夠有效減少圖像中存在的雜訊。在第5~6圖所示的實施例的教示下,本領域技術人員可以想到,對於視頻輸入的圖片幀序列,還可以選擇其中的更多個相鄰的圖片幀進行運動目標檢測,這些都屬於本申請覆蓋的範圍。The moving object detection process shown in Figure 6 can effectively reduce the noise existing in the image compared to Figure 5. Under the teaching of the embodiments shown in FIGS. 5 to 6, those skilled in the art can think that, for the picture frame sequence inputted by the video, more adjacent picture frames can also be selected for moving object detection, all of which are fall within the scope of this application.

此外,在一個優選的實施例中,保證跟蹤的可靠性,在跟蹤圖片幀達到設定數目後,需要再次執行對標定元件的檢測,獲取該標定元件的位置資訊。從而,本發明的運動檢測方法還可以包含:獲取跟蹤該圖片幀序列所跟蹤幀的數目;以及回應於該跟蹤幀的數目達到預設值,再次執行該對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊,即再次執行步驟S32或步驟S41。In addition, in a preferred embodiment, to ensure the reliability of the tracking, after the tracking picture frame reaches the set number, it is necessary to perform the detection of the calibration element again to obtain the position information of the calibration element. Therefore, the motion detection method of the present invention may further comprise: acquiring the number of frames tracked by the picture frame sequence; and in response to the number of the tracking frames reaching a preset value, performing calibration in the pair of video input picture frame sequences again The component is detected, and the position information of the calibration component is acquired, that is, step S32 or step S41 is performed again.

第7~8圖描述了該標定元件移動距離的測定。如第7圖所示,以標該記部件102的圖形形狀為正方形為例。該標記部件102的邊長L為2cm。該檢測終端200由標定元件100的視頻圖像中確定正方形的邊對應第一像素數為100,則該標定元件100的視頻圖像中像素對應的實際距離為0.02cm。Figures 7-8 describe the measurement of the distance traveled by the calibration element. As shown in FIG. 7, it is assumed that the shape of the figure of the marking member 102 is a square as an example. The side length L of the marking member 102 is 2 cm. The detection terminal 200 determines from the video image of the calibration element 100 that the first number of pixels corresponding to the sides of the square is 100, and the actual distance corresponding to the pixels in the video image of the calibration element 100 is 0.02 cm.

以運動為實施心肺復蘇為例。在實施心肺復蘇的過程中,施救人員進行按壓,該標定元件100移動時,該檢測終端200由該標定元件的視頻圖像中確定上極限圖像幀和下極限圖像幀。根據上極限圖像幀和下極限圖像幀確定標定元件移動距離對應的第二像素數。Take exercise as an example to implement cardiopulmonary resuscitation. During cardiopulmonary resuscitation, the rescuer presses, and when the calibration element 100 moves, the detection terminal 200 determines the upper limit image frame and the lower limit image frame from the video image of the calibration element. The second pixel number corresponding to the moving distance of the calibration element is determined according to the upper limit image frame and the lower limit image frame.

如第8圖所示,該標定元件100移動時,該檢測終端200由該標定元件100的視頻圖像的各個圖像幀中可識別出一次按壓操作的上極限圖像幀和下極限圖像幀。上極限圖像幀和下極限圖像幀中該標記部件102的上極限位和下極限位元之間的像素數作為該標定元件100移動距離對應的第二像素數。As shown in FIG. 8 , when the calibration element 100 moves, the detection terminal 200 can identify the upper limit image frame and the lower limit image of a pressing operation from each image frame of the video image of the calibration element 100 frame. The number of pixels between the upper limit position and the lower limit position of the marking component 102 in the upper limit image frame and the lower limit image frame is taken as the second pixel number corresponding to the moving distance of the calibration element 100 .

進行初次按壓時,將該標定元件100未移動時圖像中的圖像幀作為初次按壓的上極限圖像幀;隨著該標定元件100的下移,該視頻圖像中該標記部件102對應的像素不斷下移;該檢測終端200識別到標記部件102對應的像素不再下移時,將此時的一圖像幀作為初次按壓的下極限圖像幀。隨著該標定元件100的上移,該處理模組的第二子模組識別到該標記部件102對應的像素不再上移時,將此時的一圖像幀作為二次按壓的上極限圖像幀;之後該標定元件100下移,該檢測終端200識別到該標記部件102對應的像素不再下移時,將此時的一圖像幀作為二次按壓的下極限圖像幀。如此迴圈,該檢測終端200可識別出每次按壓對應的上極限圖像幀和下極限圖像幀。通過上極限圖像幀和下極限圖像幀,確定每次按壓時該標定元件100移動距離對應的第二像素數。該檢測終端200根據該標定元件的視頻圖像中像素對應的實際距離和第二像素數確定該標定元件移動距離。When the first pressing is performed, the image frame in the image when the calibration element 100 is not moved is regarded as the upper limit image frame of the first pressing; with the downward movement of the calibration element 100, the marking part 102 in the video image corresponds to When the pixel corresponding to the marking part 102 no longer moves downward, the detection terminal 200 takes an image frame at this time as the lower limit image frame of the first pressing. With the upward movement of the calibration element 100, the second sub-module of the processing module recognizes that the pixel corresponding to the marking component 102 is no longer moved upward, and takes an image frame at this time as the upper limit of the second pressing image frame; then the calibration element 100 moves down, and the detection terminal 200 recognizes that the pixel corresponding to the marking part 102 no longer moves down, and takes an image frame at this time as the lower limit image frame for the second pressing. In this way, the detection terminal 200 can identify the upper limit image frame and the lower limit image frame corresponding to each pressing. Through the upper limit image frame and the lower limit image frame, the second number of pixels corresponding to the moving distance of the calibration element 100 in each pressing is determined. The detection terminal 200 determines the moving distance of the calibration element according to the actual distance corresponding to the pixel in the video image of the calibration element and the second number of pixels.

例如,一次按壓中,該檢測終端200確定該標定元件100移動距離S對應的第二像素數為200,該標定元件的視頻圖像中像素對應的實際距離為0.02cm,計算得出該標定元件移動距離S為4cm。將4cm作為此次的按壓深度。For example, in one press, the detection terminal 200 determines that the second pixel number corresponding to the moving distance S of the calibration element 100 is 200, and the actual distance corresponding to the pixels in the video image of the calibration element is 0.02 cm, and the calibration element is calculated to obtain The moving distance S is 4 cm. Let 4cm be the compression depth for this time.

在實際場景中,該標定元件上的標記部件102的法線可能並不指向該檢測終端200,即該檢測終端200由斜向拍攝該標定元件。此時,該處理模組可根據該標記部件的圖像變形量確定該檢測終端200由哪個方向拍攝該標定元件100;根據相應角度的余弦關係轉換,該檢測終端200確定該標定元件的視頻圖像中像素對應的實際距離。此設計主要是涉及到人在佩戴該標定元件100進行救治時,該標定元件100的標記部件102所在平面不一定與該標定元件100與該檢測終端200的連線方向是垂直的。當不垂直時,該檢測終端200檢測到的標記部件102就會形成一定的畸變。例如本來該標記部件是圓形時,在該標定元件的標記部件所在平面與該標定元件和該檢測終端的連線方向不垂直時,檢測到的標記部件就呈現橢圓形。此時雖然該檢測終端知道該標記部件的尺寸,例如圓的直徑是2㎝,但在其檢測到的圖像中橢圓的長軸是2釐米,而短軸不到2㎝。此時,該檢測終端200就要根據其實際拍攝到的圖形來識別出實際的標記部件的尺寸,例如以橢圓的長軸來代表圓形的直徑。在圓變為橢圓的情況下,還相對比較簡單,而在例如使用矩形、多邊形等情況下,畸變會變得複雜。例如矩形包含長、短邊,在不垂直時,可能拍攝到的是一個平行四邊形。此時需要根據平行四邊形的兩條相鄰邊的夾角,判斷出該矩形所在平面與(該標定元件與該檢測終端之間的)連線的夾角,進而根據余弦關係轉換計算所拍攝到的平行四邊形的各邊所代表的實物的長度,進而計算出在按壓方向上,各像素代表的實際距離。In an actual scene, the normal line of the marking part 102 on the calibration element may not point to the detection terminal 200 , that is, the detection terminal 200 shoots the calibration element from an oblique direction. At this time, the processing module can determine which direction the detection terminal 200 shoots the calibration element 100 according to the image deformation amount of the marking component; according to the conversion of the cosine relationship of the corresponding angle, the detection terminal 200 determines the video image of the calibration element The actual distance corresponding to the pixels in the image. This design mainly involves that when a person wears the calibration element 100 for rescue, the plane where the marking part 102 of the calibration element 100 is located is not necessarily perpendicular to the direction of the connection between the calibration element 100 and the detection terminal 200 . When it is not vertical, the marking part 102 detected by the detection terminal 200 will form a certain distortion. For example, when the marking part is originally circular, when the plane where the marking part of the marking element is located is not perpendicular to the direction of the connection between the marking part and the detection terminal, the detected marking part takes on an oval shape. At this time, although the detection terminal knows the size of the marking component, for example, the diameter of the circle is 2 cm, the long axis of the ellipse in the detected image is 2 cm, and the short axis is less than 2 cm. At this time, the detection terminal 200 needs to identify the actual size of the marking component according to the actual image captured by the detection terminal 200, for example, the long axis of the ellipse represents the diameter of the circle. In the case of a circle becoming an ellipse, it is also relatively simple, while in the case of eg using rectangles, polygons, etc., the distortion becomes complicated. For example, a rectangle contains long and short sides. When it is not vertical, it may be a parallelogram. At this time, it is necessary to determine the angle between the plane where the rectangle is located and the connection line (between the calibration element and the detection terminal) according to the angle between the two adjacent sides of the parallelogram, and then convert the captured parallelism according to the cosine relationship. The length of the real object represented by each side of the quadrilateral, and then the actual distance represented by each pixel in the pressing direction is calculated.

當該標定元件100的標記部件102所在平面不與該標定元件100與該檢測終端200的連線方向垂直時,除了上述檢測終端200根據該標記部件102的具體形狀糾正檢測到的標記部件102形成的畸變,獲取該標記部件102的實際參考尺寸的方式,還可以通過矯正該標定元件100與該檢測終端200所處的參考坐標系的方式,獲取該標記部件102的實際參考尺寸。When the plane where the marking part 102 of the calibration element 100 is located is not perpendicular to the direction of the connection between the calibration element 100 and the detection terminal 200 , in addition to the above-mentioned detection terminal 200 correcting the detected marking part 102 according to the specific shape of the marking part 102 The actual reference size of the marking component 102 can be obtained by correcting the reference coordinate system in which the calibration element 100 and the detection terminal 200 are located to obtain the actual reference size of the marking component 102.

此外,對於該檢測終端200測量的距離的精度,一方面,該檢測終端200在拍攝運動過程中使用的攝像頭的清晰度越高,精度損失越小,即精度越高;另一方面,依據如下精度損失的公式:In addition, regarding the accuracy of the distance measured by the detection terminal 200, on the one hand, the higher the resolution of the camera used by the detection terminal 200 during the shooting motion, the smaller the loss of accuracy, that is, the higher the accuracy; on the other hand, according to the following The formula for the loss of precision:

Figure 02_image001
Figure 02_image001

其中,

Figure 02_image003
Figure 02_image005
分別表示測量時的邊緣選取造成的誤差和像素本身的誤差,
Figure 02_image007
Figure 02_image009
分別實際待測目標距離的誤差和參考距離的誤差,
Figure 02_image011
Figure 02_image013
分別代表該參考距離和該實際待測目標的距離,該參考距離表示運動過程中第一極限位置點的標定元件100的第一設定參考基準線至第二極限位置點的標定元件100的第二設定參考基準線的距離,而該實際待測目標的距離表示運動過程中第一極限位置點的標定元件100的第一設定參考基準線至第二極限位置點的標定元件100的該第一設定參考基準線的距離。例如,對於進行上下運動(例如心肺複運動)過程來說,參考距離表示運動過程最高點的標定元件100(例如,手環)的上邊沿至最低點的標定元件100的下邊沿的距離,而該實際待測目標的距離表示運動過程最高點的標定元件100(例如,手環)的上邊沿至最低點的標定元件100的上邊沿的距離。in,
Figure 02_image003
and
Figure 02_image005
respectively represent the error caused by the edge selection during measurement and the error of the pixel itself,
Figure 02_image007
and
Figure 02_image009
The error of the actual target distance to be measured and the error of the reference distance, respectively,
Figure 02_image011
and
Figure 02_image013
Represent the reference distance and the distance of the actual target to be measured, respectively, and the reference distance represents the first set reference reference line of the calibration element 100 at the first limit position point during the movement to the second limit position of the calibration element 100 at the second limit position point. The distance of the reference reference line is set, and the distance of the actual target to be measured represents the first setting of the reference reference line of the calibration element 100 at the first limit position point during the movement process to the first setting of the calibration element 100 at the second limit position point The distance from the reference baseline. For example, for a process of performing up and down movements (such as cardiopulmonary rehabilitation), the reference distance represents the distance from the upper edge of the calibration element 100 (eg, wristband) at the highest point of the exercise process to the lower edge of the calibration element 100 at the lowest point, while The distance of the actual target to be measured represents the distance from the upper edge of the calibration element 100 (eg, wristband) at the highest point in the movement process to the upper edge of the calibration element 100 at the lowest point.

從上述公式可以看出,以看到當參考距離越大,精度損失E就會逐漸變小。從而可知,拍攝時的攝像頭的像素值和實際距離的測量都會造成實驗時的精度誤差,一方面通過使用高清攝像頭,另一方面通過增加參考距離,可以有效縮減實驗中的誤差。It can be seen from the above formula that when the reference distance is larger, the accuracy loss E will gradually become smaller. It can be seen that the pixel value of the camera during shooting and the measurement of the actual distance will cause the accuracy error during the experiment. On the one hand, by using the high-definition camera, on the other hand, by increasing the reference distance, the error in the experiment can be effectively reduced.

儘管上面實施例結合心肺復蘇檢測描述了具體的演算法,但本方案不限於應用於該場景,而是還可以應用于諸如肢體、身體運動的跟蹤和測量上,進而可以應用到健身、康復等各種肢體運動的場景中的運動檢測,例如:體育運動打分(體操等)、健身(例如原地快速蹬踏,檢測其頻率拐點)、康復、身體運用機能測量、舞蹈、拉琴(如小提琴)、打鼓等。Although the above embodiment describes a specific algorithm in conjunction with CPR detection, the solution is not limited to this scenario, but can also be applied to tracking and measurement of limbs and body movements, and further can be applied to fitness, rehabilitation, etc. Motion detection in various limb movement scenarios, such as: sports scoring (gymnastics, etc.), fitness (such as fast pedaling in place, detection of its frequency inflection point), rehabilitation, physical function measurement, dancing, playing the piano (such as violin) , drumming, etc.

本方案不僅可以採集心肺復蘇時的上半身運動資料,還可以在平時採集人體原地訓練資料,如計算原地快速抬落腿,俯臥撐的頻率、次數、深度等指標。在康復者需要運動的身體部分,比如手臂、腿、腰上帶上標定裝置,比如手環、腿環等,利用手機攝像頭拍攝監控運動過程,監測運動幅度、頻率、軌跡等,並能給出幅度測量記錄(解析度2mm,精度5mm)、頻率記錄、軌跡在視頻上畫出等功能。This program can not only collect upper body exercise data during cardiopulmonary resuscitation, but also collect in-situ training data of the human body at ordinary times, such as calculating the frequency, frequency, and depth of rapid leg lifts and push-ups in situ. Put calibration devices on the parts of the body that the recovered person needs to exercise, such as arms, legs, and waistbands, such as wristbands, leg rings, etc., use the mobile phone camera to record and monitor the movement process, monitor the movement amplitude, frequency, trajectory, etc., and can give Amplitude measurement record (resolution 2mm, precision 5mm), frequency record, track drawing on video and other functions.

根據本發明的運動檢測方法,通過運動目標檢測過程,通過檢測目標顏色且處於運動的物體,能夠大致識別標記元件的位置,在經過膨脹侵蝕和連通域篩選處理後,還能夠去除圖片中的雜訊和干擾,然後通過邊緣檢測並將所提取的邊緣進行對應的變換,能夠精確識別該標記元件,並獲取該標記元件的位置資訊。最後,在獲取標記的位置資訊後再進行跟蹤和距離測量。本發明的運動檢測方法能夠實現更精確和更快速的目標檢測、跟蹤和測量。According to the motion detection method of the present invention, through the moving target detection process, the position of the marking element can be roughly identified by detecting the target color and moving object, and after the expansion erosion and the connected domain screening process, the noise in the picture can also be removed. Then, through edge detection and corresponding transformation of the extracted edge, the marking element can be accurately identified and the position information of the marking element can be obtained. Finally, tracking and distance measurements are performed after obtaining the location information of the markers. The motion detection method of the present invention can realize more accurate and faster target detection, tracking and measurement.

根據本發明的另一個方面,提供一種運動檢測裝置。如第9圖所示,該裝置包含如下模組:According to another aspect of the present invention, a motion detection apparatus is provided. As shown in Figure 9, the device includes the following modules:

一拍攝模組91,用於拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴一標定元件。A photographing module 91 is used for photographing the movement of the detected person to form a picture frame sequence, and the detected person wears a calibration element.

被檢測者佩戴該標定元件,該標定元件可以為手環、腳環等。在被檢測者佩戴該標定元件後,一檢測終端可以拍攝被檢測者的運動,形成視頻輸入,然後將視頻輸入轉換為圖片幀序列,形成圖片幀序列。The detected person wears the calibration element, and the calibration element can be a wristband, a foot ring, or the like. After the detected person wears the calibration element, a detection terminal can photograph the motion of the detected person to form a video input, and then convert the video input into a picture frame sequence to form a picture frame sequence.

一檢測模組92,用於該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊。A detection module 92 is used for detecting the calibration element in the picture frame sequence to obtain position information of the calibration element.

在將視頻輸入轉換為圖片幀序列後,首先需要識別圖片中該標定元件的位置,在獲取該標定位置的位置資訊後,才便於後續對該標定元件的跟蹤以及根據跟蹤後的結果對該標定元件移動距離的測量。在第10~12圖中將會對該檢測模組92進行更詳細的描述。After converting the video input into a picture frame sequence, it is first necessary to identify the position of the calibration component in the picture. After obtaining the position information of the calibration position, it is convenient for subsequent tracking of the calibration component and the calibration according to the tracking result. A measure of how far a component has moved. The detection module 92 will be described in more detail in Figures 10-12.

一跟蹤模組93,用於根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件。A tracking module 93 for tracking the calibration element in the picture frame sequence according to a tracking algorithm.

為了保證測距的速度,需要對標定元件進行目標檢測並進行跟蹤。在通過該檢測模組92獲得該標定元件的位置資訊後,由於該標定元件處於運動的狀態,需要保持對該標定元件的跟蹤。通過該跟蹤演算法,保證在目標在僅僅有微弱形變且快速移動的時候保證良好的跟蹤效果,能夠提取出該標定元件移動的軌跡。In order to ensure the speed of ranging, it is necessary to perform target detection and tracking on the calibration element. After the position information of the calibration element is obtained through the detection module 92, since the calibration element is in a moving state, it is necessary to keep track of the calibration element. Through the tracking algorithm, a good tracking effect is ensured when the target only has weak deformation and moves rapidly, and the trajectory of the movement of the calibration element can be extracted.

在一個優選的實施例中,該跟蹤演算法可以包含KCF演算法(Kernel Correlation Filter,核相關濾波演算法)。KCF演算法具有如下優點:實現簡潔、效果好、速度快。通過迴圈矩陣位移產生大量樣本來解決問題,並且通過離散傅裡葉變換的推導,在頻域計算速度極快。在缺少樣本的情況下,通過簡單的方法檢測,連接核運算進行跟蹤,保證了跟蹤的泛化能力。In a preferred embodiment, the tracking algorithm may include a KCF algorithm (Kernel Correlation Filter, kernel correlation filter algorithm). The KCF algorithm has the following advantages: simple implementation, good effect and fast speed. The problem is solved by generating a large number of samples through the displacement of the loop matrix, and by the derivation of the discrete Fourier transform, the calculation speed is extremely fast in the frequency domain. In the case of lack of samples, a simple method is used to detect and connect kernel operations to track, which ensures the generalization ability of tracking.

一測定模組94,用於測定該標定元件的移動距離。A measuring module 94 is used for measuring the moving distance of the calibration element.

首先,該檢測終端200預先知道該標定元件100上的標記部件102的預定尺寸,並在捕捉到該標記部件102後,獲知該標記部件102所佔用的像素值。然後,在跟蹤該標定元件的過程中,提取該標定元件運動過程中的極值點的位置資訊,該極值點的位置資訊包含上下運動的最上位置時的位置資訊以及最下位置的位置資訊,或者包含左右運動的最左位置時的位置資訊以及最右位置的位置資訊,當然,極值點的位置資訊還可以包含其他運動極限位置的資訊。通過取該標定元件運動過程中的極值點的位置資訊,獲知標定元件運動過程中所佔用的像素值,然後依據該標記部件102的尺寸以及該標記部件102所佔用的像素值,獲得該標定元件的運動距離。First, the detection terminal 200 knows the predetermined size of the marking part 102 on the calibration element 100 in advance, and after capturing the marking part 102 , knows the pixel value occupied by the marking part 102 . Then, in the process of tracking the calibration element, the position information of the extreme point during the movement of the calibration element is extracted, and the position information of the extreme point includes the position information of the uppermost position and the position information of the lowermost position of the up and down movement , or include the position information of the leftmost position and the position information of the rightmost position of the left and right movement. Of course, the position information of the extreme point may also include the information of other extreme positions of the movement. By taking the position information of the extreme point during the movement of the calibration element, the pixel value occupied during the movement of the calibration element is obtained, and then the calibration is obtained according to the size of the marking part 102 and the pixel value occupied by the marking part 102 The movement distance of the element.

第10圖是根據本發明一個實施例的第9圖所示的檢測模組92的示意圖。如第10圖所示,該檢測模組92包含如下單元:FIG. 10 is a schematic diagram of the detection module 92 shown in FIG. 9 according to an embodiment of the present invention. As shown in FIG. 10, the detection module 92 includes the following units:

一運動目標檢測單元921,用於對該圖片幀序列進行運動目標檢測。A moving object detection unit 921, configured to perform moving object detection on the picture frame sequence.

該運動目標檢測用於提取圖片幀中標定元件的資訊。運動目標檢測演算法有很多種,包含背景減除法、光流法和幀差法。在一個優選的實施例中,採用幀差法實施運動目標檢測。其中,採用幀差法實施運動目標檢測如第11~12圖所示,下文將會進行詳細介紹。The moving object detection is used to extract the information of the target element in the picture frame. There are many kinds of moving target detection algorithms, including background subtraction, optical flow and frame difference. In a preferred embodiment, a frame difference method is used to implement moving object detection. Among them, the frame difference method is used to implement moving target detection as shown in Figures 11 to 12, which will be described in detail below.

在一個可選的實施例中,為了減少計算量,該檢測模組92還可以包含如下單元:In an optional embodiment, in order to reduce the amount of calculation, the detection module 92 may further include the following units:

一二值化處理單元922,用於對該運動目標檢測後的結果進行二值化處理。A binarization processing unit 922, configured to perform binarization processing on the result of the moving object detection.

通過二值化處理,濾除掉多餘資訊,將顏色資訊處理為黑和白,能夠大大減少計算量。Through binarization, redundant information is filtered out, and color information is processed into black and white, which can greatly reduce the amount of calculation.

在另一個可選的實施例中,為了減少濾除掉除了標定元件外的小面積的雜訊干擾,該檢測模組92還可以包含如下單元:In another optional embodiment, in order to filter out small-area noise interference except for the calibration element, the detection module 92 may further include the following units:

一膨脹侵蝕處理單元923,用於對二值化處理後的結果進行膨脹侵蝕處理;以及a dilation erosion processing unit 923, configured to perform dilation erosion processing on the binarized result; and

一連通域篩選處理單元924,用於對膨脹侵蝕後的結果進行連通域篩選處理。A connected domain filtering processing unit 924, configured to perform connected domain filtering processing on the result after dilation and erosion.

其中,可以設置合適的膨脹侵蝕的大小,也可以設置連通域篩選的面積,例如,篩選掉小於300像素的連通域。Among them, an appropriate size of dilation erosion can be set, and an area of connected domain screening can also be set, for example, a connected domain less than 300 pixels can be filtered out.

在完成運動目標檢測的篩選後,可以在圖片幀中大致得到感興趣的目標,包含該標記元件,但是仍然不能排除掉一小部分的干擾。因此,將根據該標記元件的邊緣特徵來識別該標記元件的具體位置。從而,該檢測模組92包含:After completing the screening of moving object detection, the object of interest can be roughly obtained in the picture frame, including the marker element, but still a small part of the interference cannot be excluded. Therefore, the specific location of the marker element will be identified based on the edge features of the marker element. Thus, the detection module 92 includes:

一邊緣處理單元925,用於將該運動目標檢測的結果進行邊緣檢測處理,在邊緣檢測處理過程中,所提取的邊緣包含該標定元件的邊緣。An edge processing unit 925, configured to perform edge detection processing on the result of the moving object detection. During the edge detection processing, the extracted edge includes the edge of the calibration element.

在一個具體的實施例中,進行邊緣檢測的演算法包含canny演算法。在進行邊緣檢測處理後,所提取的邊緣包含該標定元件的邊緣,也可能包含不是該標定元件的其他物體的邊緣。從而,為了更精確確定標定元件的位置,該檢測模組92包含:In a specific embodiment, the algorithm for edge detection includes a canny algorithm. After the edge detection process is performed, the extracted edge includes the edge of the calibration element, and may also include the edge of other objects that are not the calibration element. Therefore, in order to more accurately determine the position of the calibration element, the detection module 92 includes:

一邊緣變換單元926,用於根據該標定元件的預設形狀,將所提取的邊緣進行對應的變換,從而獲取該標定元件的該位置資訊。An edge transformation unit 926, configured to perform corresponding transformation on the extracted edge according to the preset shape of the calibration element, so as to obtain the position information of the calibration element.

例如,該標定元件為手環,那麼其預設形狀為矩形,可以通過相應的轉換演算法,例如,霍夫轉換,提取矩形的各個直線段,從而確定所提取的邊緣為手環的邊緣。更為具體地,設定一個直線段的數量的閾值,例如2或3,當經過霍夫轉換提取的直線段的數量大於等於該閾值時,可以確認該邊緣為矩形的邊緣,即檢測到手環的邊緣。For example, if the calibration element is a wristband, then its preset shape is a rectangle, and each straight line segment of the rectangle can be extracted through a corresponding transformation algorithm, such as Hough transform, so as to determine that the extracted edge is the edge of the wristband. More specifically, set a threshold for the number of straight line segments, such as 2 or 3. When the number of straight line segments extracted by Hough transform is greater than or equal to the threshold, it can be confirmed that the edge is a rectangular edge, that is, the wristband is detected. edge.

再如,如果該標定元件的預設形狀為圓形或橢圓,可以通過相應的轉換演算法,例如,另一種霍夫轉換,提取圓形或橢圓形,從而確定所提取的邊緣為該標記元件的邊緣或邊緣的組成部分。For another example, if the preset shape of the marking element is a circle or an ellipse, a corresponding transformation algorithm, such as another Hough transformation, can be used to extract a circle or an ellipse, so as to determine that the extracted edge is the marking element the edge or part of the edge.

在提取該標定元件的邊緣或邊緣的組成部分時,根據該標定元件的預設形狀的特點,設置對應的轉換演算法,提取出該標定元件的邊緣或邊緣的組成部分,對於採用什麼樣的轉換演算法,本發明不做限定,只要該轉換演算法能夠提取並確定該標定元件的邊緣即可。When extracting the edge or edge component of the calibration component, set the corresponding conversion algorithm according to the characteristics of the preset shape of the calibration component, and extract the edge or edge component of the calibration component. The conversion algorithm is not limited in the present invention, as long as the conversion algorithm can extract and determine the edge of the calibration element.

在獲取該標記元件的邊緣後,就能夠知道該標記元件的位置資訊。例如,該標記元件為手環,可以以座標[X,Y,H,W]表示手環的位置,在一個具體實施例中,X和Y分別表示手環矩形的左上角頂點的橫坐標和縱坐標,而H和W分別表示手環矩形的高度和寬度。After the edge of the marking element is acquired, the position information of the marking element can be known. For example, the marking element is a wristband, and the position of the wristband can be represented by coordinates [X, Y, H, W]. In a specific embodiment, X and Y respectively represent the abscissa and the upper left corner of the wristband rectangle The vertical coordinate, while H and W represent the height and width of the bracelet rectangle, respectively.

第11圖是根據本發明一個實施例的運動目標檢測模組的示意圖。對於視頻輸入的圖片幀序列,選擇其中的兩個相鄰的圖片幀(這兩個圖片幀優選的為圖片幀序列的前兩個相鄰的圖片幀)進行運動目標檢測。該運動目標檢測單元包含:FIG. 11 is a schematic diagram of a moving target detection module according to an embodiment of the present invention. For the picture frame sequence of video input, two adjacent picture frames (preferably the first two adjacent picture frames of the picture frame sequence) are selected for moving object detection. The moving target detection unit includes:

一第一圖片幀獲取子單元111,用於獲取該圖片幀序列中的相鄰的一第一圖片幀和一第二圖片幀。A first picture frame obtaining subunit 111 is configured to obtain an adjacent first picture frame and a second picture frame in the picture frame sequence.

一第一顏色提取子單元112,用於從該第一圖片幀和該第二圖片幀中分別提取目標顏色。A first color extraction subunit 112 for extracting target colors from the first picture frame and the second picture frame, respectively.

目標顏色是標記元件的顏色,提取目標顏色是為了便於對標記元件的檢測。目標顏色優選與人體膚色、衣著以及視頻背景均不同的顏色,例如,紅色或綠色等。The target color is the color of the marking element, and the target color is extracted to facilitate the detection of the marking element. The target color is preferably a color different from human skin color, clothing, and video background, such as red or green, etc.

一第一差分子單元113,用於將該第一圖片幀和該第二圖片幀中提取目標顏色進行差分,獲得運動目標檢測的結果。A first difference sub-unit 113, configured to perform a difference between the extracted target colors in the first picture frame and the second picture frame to obtain a result of moving object detection.

第12圖是根據本發明一個實施例的運動目標檢測模組的示意圖。與第11圖不同的是,對於視頻輸入的圖片幀序列,選擇其中的三個相鄰的圖片幀(這三個圖片幀優選的為圖片幀序列的前三個相鄰的圖片幀)進行運動目標檢測。該運動目標檢測單元包含:FIG. 12 is a schematic diagram of a moving object detection module according to an embodiment of the present invention. The difference from Figure 11 is that for the video input picture frame sequence, select three adjacent picture frames (these three picture frames are preferably the first three adjacent picture frames of the picture frame sequence) for motion. Target Detection. The moving target detection unit includes:

一第二圖片幀獲取子單元121,用於獲取該圖片幀序列中的相鄰的第一圖片幀、第二圖片幀和一第三圖片幀。A second picture frame obtaining subunit 121, configured to obtain adjacent first picture frames, second picture frames and a third picture frame in the picture frame sequence.

一第二顏色提取子單元122,用於從該第一圖片幀、第二圖片幀和第三圖片幀中分別提取目標顏色。A second color extraction subunit 122 for extracting the target color from the first picture frame, the second picture frame and the third picture frame, respectively.

目標顏色是標記元件的顏色,提取目標顏色是為了便於對標記元件的檢測。目標顏色優選與人體膚色、衣著以及視頻背景均不同的顏色,例如,紅色或綠色等。The target color is the color of the marking element, and the target color is extracted to facilitate the detection of the marking element. The target color is preferably a color different from human skin color, clothing, and video background, such as red or green, etc.

一第二差分子單元123,用於將該第一圖片幀和該第二圖片幀中提取的目標顏色進行差分,獲得一第一差分結果。A second difference sub-unit 123 is configured to perform a difference between the first picture frame and the target color extracted from the second picture frame to obtain a first difference result.

一第三差分子單元124,用於將該第二圖片幀和該第三圖片幀中提取的目標顏色進行差分,獲得一第二差分結果。A third difference sub-unit 124 is configured to perform a difference between the second picture frame and the target color extracted from the third picture frame to obtain a second difference result.

一取交集子單元125,用於將該第一差分結果與該第二差分結果取交集,獲得運動目標檢測的結果。An intersection subunit 125 is configured to take the intersection of the first difference result and the second difference result to obtain a moving target detection result.

第12圖所示的運動目標檢測過程相對第11圖能夠有效減少圖像中存在的雜訊。在第11~12圖所示的實施例的教示下,本領域技術人員可以想到,對於視頻輸入的圖片幀序列,還可以選擇其中的更多個相鄰的圖片幀進行運動目標檢測,這些都屬於本申請覆蓋的範圍。The moving object detection process shown in Figure 12 can effectively reduce the noise existing in the image compared to Figure 11. Under the teachings of the embodiments shown in FIGS. 11 to 12, those skilled in the art can think that, for the video input picture frame sequence, more adjacent picture frames can also be selected for moving object detection, all of which are fall within the scope of this application.

此外,在一個優選的實施例中,保證跟蹤的可靠性,在跟蹤圖片幀達到設定數目後,需要再次執行對該標定元件的檢測,獲取該標定元件的位置資訊。從而,本發明的運動檢測裝置還可以包含:一獲取模組,用於獲取跟蹤該圖片幀序列所跟蹤幀的數目。這樣,在跟蹤幀的數目達到預設值後,使得該檢測模組92再次執行該對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊。In addition, in a preferred embodiment, to ensure the reliability of the tracking, after the tracking picture frame reaches the set number, it is necessary to perform the detection of the calibration element again to obtain the position information of the calibration element. Therefore, the motion detection apparatus of the present invention may further comprise: an acquisition module for acquiring the number of frames tracked in the picture frame sequence. In this way, after the number of tracking frames reaches the preset value, the detection module 92 is made to perform the detection of the calibration element in the video input picture frame sequence again, and obtain the position information of the calibration element.

根據本發明的運動檢測裝置,通過運動目標檢測過程,通過檢測目標顏色且處於運動的物體,能夠大致識別標記元件的位置,在經過膨脹侵蝕和連通域篩選處理後,還能夠去除圖片中的雜訊和干擾,然後通過邊緣檢測並將所提取的邊緣進行對應的變換,能夠精確識別該標記元件,並獲取該標記元件的位置資訊。最後,在獲取標記的位置資訊後再進行跟蹤和距離測量。本發明的運動檢測裝置能夠實現更精確和更快速的目標檢測、跟蹤和測量。According to the motion detection device of the present invention, through the moving target detection process, by detecting the object color and moving object, the position of the marking element can be roughly identified, and after the expansion erosion and the connected domain screening process, the noise in the picture can also be removed. Then, through edge detection and corresponding transformation of the extracted edge, the marking element can be accurately identified and the position information of the marking element can be obtained. Finally, tracking and distance measurements are performed after obtaining the location information of the markers. The motion detection device of the present invention can realize more precise and faster target detection, tracking and measurement.

根據本申請的另一方面,提供了一種電子設備,其包含處理器和記憶體,該記憶體存儲有該電腦程式,當該電腦程式被該處理器執行時,使得該處理器執行如以上任一個實施方式所述的運動檢測方法。According to another aspect of the present application, an electronic device is provided, which includes a processor and a memory, the memory stores the computer program, and when the computer program is executed by the processor, causes the processor to execute any of the above A motion detection method according to an embodiment.

根據本申請的另一方面,提供了一種內儲程式之電腦可讀取記錄媒體,其上存儲有電腦可讀指令,當該指令被處理器執行時,能夠使得該處理器執行如以上任一個實施方式所述的運動檢測方法。具體來說,該運動檢測方法包含:拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴標定元件;對該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊;根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件;以及測定該標定元件的移動距離。According to another aspect of the present application, there is provided a computer-readable recording medium with a stored program, on which computer-readable instructions are stored, and when the instructions are executed by a processor, the processor can be made to execute any one of the above The motion detection method described in the embodiment. Specifically, the motion detection method includes: photographing the motion of the detected person to form a picture frame sequence, the detected person wearing a calibration element; detecting the calibration element in the picture frame sequence to obtain the position information of the calibration element ; tracking the calibration element in the sequence of picture frames according to a tracking algorithm; and determining the moving distance of the calibration element.

其中,該對該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊包含:對該圖片幀序列進行運動目標檢測;將該運動目標檢測的結果進行邊緣檢測處理,在邊緣檢測處理過程中,所提取的邊緣包含該標定元件的邊緣;以及根據該標定元件的預設形狀,將所提取的邊緣進行對應的變換,從而獲取該標定元件的該位置資訊。Wherein, the detection of the calibration element in the picture frame sequence and the acquisition of the position information of the calibration element include: performing moving target detection on the picture frame sequence; During the processing, the extracted edge includes the edge of the calibration element; and according to the preset shape of the calibration element, the extracted edge is correspondingly transformed, so as to obtain the position information of the calibration element.

其中,該對該圖片幀序列進行運動目標檢測包含:獲取該圖片幀序列中的相鄰的第一圖片幀和第二圖片幀;從該第一圖片幀和該第二圖片幀中分別提取目標顏色;將該第一圖片幀和該第二圖片幀中提取的目標顏色進行差分,獲得運動目標檢測的結果。Wherein, performing moving target detection on the picture frame sequence includes: acquiring adjacent first picture frames and second picture frames in the picture frame sequence; extracting targets from the first picture frame and the second picture frame respectively Color; the target color extracted from the first picture frame and the second picture frame is differentiated to obtain the result of moving target detection.

其中,該對該圖片幀序列進行運動目標檢測包含:獲取該圖片幀序列中的相鄰的一第一圖片幀、一第二圖片幀和一第三圖片幀;從該第一圖片幀、第二圖片幀和第三圖片幀中分別提取目標顏色;將該第一圖片幀和該第二圖片幀中提取的目標顏色進行差分,獲得一第一差分結果;將該第二圖片幀和該第三圖片幀中提取的目標顏色進行差分,獲得一第二差分結果;將該第一差分結果與該第二差分結果取交集,獲得運動目標檢測的結果。Wherein, performing moving target detection on the picture frame sequence includes: acquiring a first picture frame, a second picture frame and a third picture frame adjacent to the picture frame sequence; The target color is extracted from the second picture frame and the third picture frame respectively; the target color extracted from the first picture frame and the second picture frame is differentiated to obtain a first difference result; the second picture frame and the The target colors extracted from the three picture frames are differentiated to obtain a second difference result; the intersection of the first difference result and the second difference result is obtained to obtain a moving target detection result.

其中,該對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊還包含:對該運動目標檢測後的結果進行二值化處理。Wherein, the detecting the calibration element in the picture frame sequence of the video input, and acquiring the position information of the calibration element further includes: performing binarization processing on the result of the moving object detection.

其中,該對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊還包含:對二值化處理後的結果進行膨脹侵蝕處理;以及對膨脹侵蝕後的結果進行連通域篩選處理。Wherein, the detection of the calibration element in the picture frame sequence of the video input, and the acquisition of the position information of the calibration element further includes: performing dilation and erosion processing on the result after the binarization processing; and performing a connected domain on the result after dilation and erosion Filter processing.

其中,該跟蹤演算法包含KCF演算法,該邊緣檢測處理包含採用canny演算法,並且/或者該運動目標檢測包含背景減除法、光流法和幀差法。Wherein, the tracking algorithm includes KCF algorithm, the edge detection process includes canny algorithm, and/or the moving object detection includes background subtraction method, optical flow method and frame difference method.

進一步地,該運動檢測方法還包含:獲取跟蹤該圖片幀序列所跟蹤幀的數目;以及回應於所跟蹤幀的數目達到預設值,再次執行該對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊。Further, the motion detection method also includes: obtaining and tracking the number of frames tracked in the picture frame sequence; and in response to the number of the tracked frames reaching a preset value, performing the calibration element in the video input picture frame sequence again. Detect to obtain the position information of the calibration element.

特別地,根據本公開的實施例,上文參考流程圖描述的過程可以被實現為電腦軟體程式。例如,本公開的實施例包含一種電腦程式產品,其包含承載在電腦可讀介質上的電腦程式,該電腦程式包含用於執行流程圖所示的方法的程式碼。在這樣的實施例中,該電腦程式可以通過其通信部件從網路上被下載和安裝,和/或從可拆卸介質被安裝。在該電腦程式被中央處理單元(CPU)執行時,執行本申請的方法中限定的上述功能。需要說明的是,本申請的電腦可讀介質可以是電腦可讀信號介質或者內儲程式之電腦可讀取記錄媒體或者是上述兩者的任意組合。內儲程式之電腦可讀取記錄媒體例如可以是但不限於電、磁、光、電磁、紅外線、或半導體的系統、裝置或器件,或者任意以上的組合。內儲程式之電腦可讀取記錄媒體的更具體的例子可以包含但不限於:具有一個或多個導線的電連接、可擕式電腦磁片、硬碟、隨機訪問記憶體(RAM)、唯讀記憶體(ROM)、可擦式可程式設計唯讀記憶體(EPROM或快閃記憶體)、光纖、可擕式緊湊磁片唯讀記憶體(CD-ROM)、光記憶體件、磁記憶體件、或者上述的任意合適的組合。在本申請中,內儲程式之電腦可讀取記錄媒體可以是任何包含或存儲程式的有形介質,該程式可以被指令執行系統、裝置或者器件使用或者與其結合使用。而在本申請中,電腦可讀的信號介質可以包含在基帶中或者作為載波一部分傳播的資料信號,其中承載了電腦可讀的程式碼。這種傳播的資料信號可以採用多種形式,包含但不限於電磁信號、光信號或上述的任意合適的組合。電腦可讀的信號介質還可以是內儲程式之電腦可讀取記錄媒體以外的任何電腦可讀介質,該電腦可讀介質可以發送、傳播或者傳輸用於由指令執行系統、裝置或者器件使用或者與其結合使用的程式。電腦可讀介質上包含的程式碼可以用任何適當的介質傳輸,包含但不限於:無線、電線、光纜、RF等等,或者上述的任意合適的組合。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program including code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via its communication component, and/or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above-described functions defined in the method of the present application are performed. It should be noted that the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable recording medium storing a program, or any combination of the above two. The computer-readable recording medium storing the program can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples of computer-readable recording media with stored programs may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), only Read Memory (ROM), Erasable Programmable Read-Only Memory (EPROM or Flash Memory), Optical Fiber, Portable Compact Disc Read-Only Memory (CD-ROM), Optical Memory Devices, Magnetic memory device, or any suitable combination of the above. In this application, a computer-readable recording medium storing a program can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may comprise a data signal in baseband or propagating as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable recording medium storing a program, which can be sent, propagated, or transmitted for use by the instruction execution system, apparatus, or device or programs used in conjunction with it. Code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一種或多種程式設計語言或其組合來編寫用於執行本申請的操作的電腦程式代碼,程式設計語言包含物件導向的程式設計語言—諸如Java、Smalltalk、C++,還包含常規的過程式程式設計語言諸如”C”語言或類似的程式設計語言。程式碼可以完全地在使用者電腦上執行、部分地在使用者電腦上執行、作為一個獨立的套裝軟體執行、部分在使用者電腦上部分在遠端電腦上執行、或者完全在遠端電腦或伺服器上執行。在涉及遠端電腦的情形中,遠端電腦可以通過任意種類的網路包含局域網(LAN)或廣域網路(WAN)連接到使用者電腦,或者,可以連接到外部電腦(例如利用網際網路服務提供者來通過網際網路連接)。Computer program code for carrying out the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional procedural programs, or a combination thereof Design language such as "C" language or similar programming language. The code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or run on the server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network including a local area network (LAN) or wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect via the Internet).

圖式中的流程圖和框圖,圖式了按照本申請各種實施例的系統、方法和電腦程式產品的可能實現的體系架構、功能和操作。在這點上,流程圖或框圖中的每個方框可以代表一個模組、程式段、或代碼的一部分,該模組、程式段、或代碼的一部分包含一個或多個用於實現規定的邏輯功能的可執行指令。也應當注意,在有些作為替換的實現中,方框中所標注的功能也可以以不同於附圖中所標注的順序發生。例如,兩個接連地表示的方框實際上可以基本並行地執行,它們有時也可以按相反的循序執行,這依所涉及的功能而定。也要注意的是,框圖和/或流程圖中的每個方框、以及框圖和/或流程圖中的方框的組合,可以用執行規定的功能或操作的專用的基於硬體的系統來實現,或者可以用專用硬體與電腦指令的組合來實現。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified Executable instructions for logical functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented using dedicated hardware-based hardware that performs the specified functions or operations. system, or can be implemented using a combination of dedicated hardware and computer instructions.

描述於本申請實施例中所涉及到的單元可以通過軟體的方式實現,也可以通過硬體的方式來實現。所描述的單元也可以設置在處理器中,例如,可以描述為:一種處理器包含接收單元、查找單元、發送單元。其中,這些單元的名稱在某種情況下並不構成對該單元本身的限定,例如,接收單元還可以被描述為“接收用於索取區塊鏈帳戶位址資訊的使用者請求的單元”。The units involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner. The described unit can also be set in the processor, for example, it can be described as: a processor includes a receiving unit, a searching unit, and a sending unit. Among them, the names of these units do not constitute a limitation of the unit itself under certain circumstances. For example, the receiving unit can also be described as "a unit that receives user requests for requesting blockchain account address information".

作為另一方面,本申請還提供了一種電腦可讀介質,該電腦可讀介質可以是上述實施例中描述的裝置中所包含的;也可以是單獨存在,而未裝配入該裝置中。上述電腦可讀介質承載有一個或者多個程式,當上述一個或者多個程式被該裝置執行時,使得該裝置執行如上所述的方法。As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the apparatus described in the above embodiments, or may exist alone without being assembled into the apparatus. The above-mentioned computer-readable medium carries one or more programs, which, when executed by the apparatus, cause the apparatus to perform the method as described above.

以上所述僅為本發明的較佳實施例而已,並不用以限制本發明,凡在本發明的精神和原則之內,所作的任何修改、等同替換、改進等,均應包含在本發明的保護範圍之內。最後應說明的是:以上所述僅為本發明的優選實施例而已,並不用於限制本發明,儘管參照前述實施例對本發明進行了詳細的說明,對於本領域的技術人員來說,其依然可以對前述各實施例所記載的技術方案進行修改,或者對其中部分技術特徵進行等同替換。凡在本發明的精神和原則之內,所作的任何修改、等同替換、改進等,均應包含在本發明的保護範圍之內。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the present invention. within the scope of protection. Finally, it should be noted that the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, the The technical solutions described in the foregoing embodiments may be modified, or some technical features thereof may be equivalently replaced. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

﹝本發明﹞ 91:拍攝模組 92:檢測模組 921:運動目標檢測單元 922:二值化處理單元 923:膨脹侵蝕處理單元 924:連通域篩選處理單元 925:邊緣處理單元 926:邊緣變換單元 93:跟蹤模組 94:測定模組 111:第一圖片幀獲取子單元 112:第一顏色提取子單元 113:第一差分子單元 121:第二圖片幀獲取子單元 122:第二顏色提取子單元 123:第二差分子單元 124:第三差分子單元 125:取交集子單元 100:標定元件 101:固定部件 102:標記部件 200:檢測終端 400:檢測終端支架 S31~S34:步驟 S41~S46:步驟 S51~S53:步驟 S61~S65:步驟﹝this invention﹞ 91: Shooting module 92: Detection module 921: Moving target detection unit 922: Binarization processing unit 923: Expansion Erosion Processing Unit 924: Connected Domain Screening Processing Unit 925: Edge Processing Unit 926: Edge Transform Unit 93: Tracking Module 94: Measurement module 111: The first picture frame acquisition subunit 112: The first color extraction subunit 113: The first difference subunit 121: second picture frame acquisition subunit 122: Second color extraction subunit 123: Second difference subunit 124: The third difference subunit 125: Take intersection subunit 100: Calibration element 101: Fixed parts 102: Marking parts 200: Detect terminal 400: Detect terminal bracket S31~S34: Steps S41~S46: Steps S51~S53: Steps S61~S65: Steps

[第1圖]   本發明實施例的運動檢測輔助系統的示意圖。 [第2圖]   本發明實施例的標定元件的示意圖。 [第3圖]   本發明一個實施例的運動檢測方法的流程圖。 [第4圖]   如第3圖所示的步驟S32的流程圖。 [第5圖]   本發明一個實施例的運動目標檢測的流程圖。 [第6圖]   本發明另一個實施例的運動目標檢測的流程圖。 [第7圖]   本發明一個實施例的正方形標記部件的示意圖。 [第8圖]   本發明一個實施例的標記部件上下移動的示意圖。 [第9圖]   本發明一個實施例的運動檢測裝置的示意圖。 [第10圖] 如第9圖所示的檢測模組的示意圖。 [第11圖]  本發明一個實施例的運動目標檢測模組的示意圖。 [第12圖] 本發明另一個實施例的運動目標檢測模組的示意圖。[Fig. 1] A schematic diagram of a motion detection assistance system according to an embodiment of the present invention. [Fig. 2] A schematic diagram of the calibration element in the embodiment of the present invention. [FIG. 3] A flowchart of a motion detection method according to an embodiment of the present invention. [FIG. 4] The flowchart of step S32 shown in FIG. 3. [FIG. 5] A flowchart of moving target detection according to an embodiment of the present invention. [Fig. 6] A flowchart of moving target detection according to another embodiment of the present invention. [Fig. 7] A schematic diagram of a square marking member according to an embodiment of the present invention. [Fig. 8] A schematic diagram of the up and down movement of the marking member according to an embodiment of the present invention. [Fig. 9] A schematic diagram of a motion detection device according to an embodiment of the present invention. [Fig. 10] A schematic diagram of the detection module shown in Fig. 9. [FIG. 11] A schematic diagram of a moving target detection module according to an embodiment of the present invention. [FIG. 12] A schematic diagram of a moving target detection module according to another embodiment of the present invention.

S31~S34:步驟S31~S34: Steps

Claims (11)

一種運動檢測方法,包含: 拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴一標定元件; 對該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊; 根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件;以及 測定該標定元件的移動距離。A motion detection method comprising: Photograph the motion of the detected person to form a picture frame sequence, the detected person wears a calibration element; Detecting the calibration element in the picture frame sequence to obtain position information of the calibration element; tracking the calibration element in the sequence of picture frames according to a tracking algorithm; and Measure the moving distance of the calibration element. 如請求項1之運動檢測方法,其中,對該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊包含對該圖片幀序列進行運動目標檢測;將該運動目標檢測的結果進行邊緣檢測處理,在邊緣檢測處理過程中,所提取的邊緣包含該標定元件的邊緣;以及根據該標定元件的預設形狀,將所提取的邊緣進行對應的變換,從而獲取該標定元件的該位置資訊。The motion detection method of claim 1, wherein the calibration element in the picture frame sequence is detected, and obtaining the position information of the calibration element includes performing moving object detection on the picture frame sequence; Edge detection processing, in the process of edge detection processing, the extracted edge includes the edge of the calibration element; and according to the preset shape of the calibration element, the extracted edge is correspondingly transformed, so as to obtain the position of the calibration element Information. 如請求項2之運動檢測方法,其中,對該圖片幀序列進行運動目標檢測包含獲取該圖片幀序列中的相鄰的一第一圖片幀和一第二圖片幀;從該第一圖片幀和該第二圖片幀中分別提取目標顏色;將該第一圖片幀和該第二圖片幀中提取的目標顏色進行差分,獲得運動目標檢測的結果。The motion detection method of claim 2, wherein performing moving object detection on the picture frame sequence includes acquiring a first picture frame and a second picture frame adjacent to the picture frame sequence; The target color is respectively extracted from the second picture frame; the difference between the first picture frame and the target color extracted from the second picture frame is performed to obtain the result of moving target detection. 如請求項2之運動檢測方法,其中,對該圖片幀序列進行運動目標檢測包含獲取該圖片幀序列中的相鄰的一第一圖片幀、一第二圖片幀和一第三圖片幀;從該第一圖片幀、第二圖片幀和第三圖片幀中分別提取目標顏色;將該第一圖片幀和該第二圖片幀中提取的目標顏色進行差分,獲得一第一差分結果;將該第二圖片幀和該第三圖片幀中提取的目標顏色進行差分,獲得一第二差分結果;將該第一差分結果與該第二差分結果取交集,獲得運動目標檢測的結果。The motion detection method of claim 2, wherein performing moving object detection on the sequence of picture frames comprises acquiring adjacent first, second and third picture frames in the sequence of picture frames; The target color is extracted from the first picture frame, the second picture frame and the third picture frame respectively; the target color extracted from the first picture frame and the second picture frame is differentiated to obtain a first difference result; the The second picture frame is differentiated from the target color extracted from the third picture frame to obtain a second difference result; the intersection of the first difference result and the second difference result is obtained to obtain a moving target detection result. 如請求項2之運動檢測方法,其中,對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊另包含對該運動目標檢測後的結果進行二值化處理。The motion detection method of claim 2, wherein detecting a calibration element in a picture frame sequence of video input, and acquiring the position information of the calibration element further includes binarizing the result of the moving object detection. 如請求項5之運動檢測方法,其中,對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊另包含對二值化處理後的結果進行膨脹侵蝕處理;以及對膨脹侵蝕後的結果進行連通域篩選處理。The motion detection method of claim 5, wherein detecting a calibration element in a picture frame sequence of video input, and obtaining the position information of the calibration element further includes performing dilation and erosion processing on the binarized result; The eroded results are processed by connected domain filtering. 如請求項2之運動檢測方法,其中,該跟蹤演算法包含KCF演算法,該邊緣檢測處理包含採用canny演算法,及/或該運動目標檢測包含背景減除法、光流法和幀差法。The motion detection method of claim 2, wherein the tracking algorithm includes a KCF algorithm, the edge detection process includes a canny algorithm, and/or the moving object detection includes a background subtraction method, an optical flow method, and a frame difference method. 如請求項1之運動檢測方法,另包含獲取跟蹤該圖片幀序列所跟蹤幀的數目;以及回應於所跟蹤幀的數目達到預設值,再次執行該對視頻輸入的圖片幀序列中的標定元件進行檢測,獲取該標定元件的位置資訊。The motion detection method of claim 1, further comprising acquiring the number of frames tracked for tracking the picture frame sequence; and in response to the number of the tracked frames reaching a preset value, executing the calibration element in the pair of video input picture frame sequences again Carry out detection to obtain the position information of the calibration element. 一種運動檢測裝置,包含: 一拍攝模組,用於拍攝被檢測者的運動,形成圖片幀序列,該被檢測者佩戴一標定元件; 一檢測模組,用於該圖片幀序列中的該標定元件進行檢測,獲取該標定元件的位置資訊; 一跟蹤模組,用於根據一跟蹤演算法跟蹤該圖片幀序列中的該標定元件;以及 一測定模組,用於測定該標定元件的移動距離。A motion detection device, comprising: a photographing module for photographing the movement of the subject to form a picture frame sequence, the subject wearing a calibration element; a detection module for detecting the calibration element in the picture frame sequence to obtain position information of the calibration element; a tracking module for tracking the calibration element in the sequence of picture frames according to a tracking algorithm; and A measuring module is used for measuring the moving distance of the calibration element. 一種電子設備,包含: 一處理器;以及 一記憶體,存儲有該電腦程式,當該電腦程式被該處理器執行時,使得該處理器執行如請求項1至8中任一項之運動檢測方法。An electronic device comprising: a processor; and A memory stores the computer program, and when the computer program is executed by the processor, makes the processor execute the motion detection method according to any one of request items 1 to 8. 一種內儲程式之電腦可讀取記錄媒體,其上存儲有電腦可讀指令,當該指令被一處理器執行時,使得該處理器執行如請求項1至8中任一項之運動檢測方法。A computer-readable recording medium with a stored program, on which computer-readable instructions are stored, when the instructions are executed by a processor, the processor is made to execute the motion detection method of any one of claims 1 to 8 .
TW110110400A 2020-06-02 2021-03-23 Motion detection method and device, electronic device, and computer-readable recording medium with stored program TWI778552B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
WOPCT/CN2020/093981 2020-06-02
PCT/CN2020/093981 WO2021243572A1 (en) 2020-06-02 2020-06-02 Motion detection method and apparatus, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
TW202145957A true TW202145957A (en) 2021-12-16
TWI778552B TWI778552B (en) 2022-09-21

Family

ID=74425093

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110110400A TWI778552B (en) 2020-06-02 2021-03-23 Motion detection method and device, electronic device, and computer-readable recording medium with stored program

Country Status (3)

Country Link
CN (1) CN112292688A (en)
TW (1) TWI778552B (en)
WO (1) WO2021243572A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114556446A (en) * 2021-12-30 2022-05-27 焦旭 Electronic equipment, hand pressing depth detection method and system and wearable equipment
CN114556447A (en) * 2021-12-30 2022-05-27 焦旭 Hand pressing depth detection method and device
CN117132925B (en) * 2023-10-26 2024-02-06 成都索贝数码科技股份有限公司 Intelligent stadium method and device for sports event

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101408942B (en) * 2008-04-17 2011-01-12 浙江师范大学 Method for locating license plate under a complicated background
CN103198492A (en) * 2013-03-28 2013-07-10 沈阳航空航天大学 Human motion capture method
JP6669358B2 (en) * 2016-12-27 2020-03-18 Coaido株式会社 Measuring device and program
CN108986141A (en) * 2018-07-03 2018-12-11 百度在线网络技术(北京)有限公司 Object of which movement information processing method, device, augmented reality equipment and storage medium
CN110968182A (en) * 2018-09-30 2020-04-07 广东虚拟现实科技有限公司 Positioning tracking method and device and wearable equipment thereof
CN110111364B (en) * 2019-04-30 2022-12-27 腾讯科技(深圳)有限公司 Motion detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2021243572A1 (en) 2021-12-09
TWI778552B (en) 2022-09-21
CN112292688A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
TWI778552B (en) Motion detection method and device, electronic device, and computer-readable recording medium with stored program
US10963041B2 (en) Gesture recognition using multi-sensory data
WO2021083242A1 (en) Map constructing method, positioning method and system, wireless communication terminal, and computer-readable medium
WO2018176938A1 (en) Method and device for extracting center of infrared light spot, and electronic device
TW201346216A (en) Virtual ruler
JP2008152622A (en) Pointing device
WO2021136386A1 (en) Data processing method, terminal, and server
CN110383335A (en) The background subtraction inputted in video content based on light stream and sensor
US11328535B1 (en) Motion identification method and system
JP2016083342A (en) Estimation of physiological parameter
Yang et al. Multiple marker tracking in a single-camera system for gait analysis
KR20100025048A (en) Image analysis apparatus and method for motion capture
WO2016143402A1 (en) Information processing apparatus and information processing method
JP2008288684A (en) Person detection device and program
KR20100071822A (en) Apparatus and method for detecting clothes in image
JP2007199864A (en) Method for image sequence generation and image column generation device
TWM610371U (en) Action recognition system
JP6246441B1 (en) Image analysis system, image analysis method, and program
WO2023193763A1 (en) Data processing method and apparatus, and tracking mark, electronic device and storage medium
Baumgartner et al. Extracting spatial knowledge from track and field broadcasts for monocular 3D human pose estimation
JP2008276613A (en) Mobile body determination device, computer program and mobile body determination method
KR101738589B1 (en) A coaching system for stretching using image recognition
WO2019097690A1 (en) Image processing device, control method, and control program
Huang et al. Accurate and efficient pulse measurement from facial videos on smartphones
JP6467994B2 (en) Image processing program, image processing apparatus, and image processing method

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent