WO2019184642A1 - Method and system for determining positions of watch face hands - Google Patents

Method and system for determining positions of watch face hands Download PDF

Info

Publication number
WO2019184642A1
WO2019184642A1 PCT/CN2019/076213 CN2019076213W WO2019184642A1 WO 2019184642 A1 WO2019184642 A1 WO 2019184642A1 CN 2019076213 W CN2019076213 W CN 2019076213W WO 2019184642 A1 WO2019184642 A1 WO 2019184642A1
Authority
WO
WIPO (PCT)
Prior art keywords
threshold
image
pointer
determining
positioning
Prior art date
Application number
PCT/CN2019/076213
Other languages
French (fr)
Chinese (zh)
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
Priority claimed from CN201810252412.2A external-priority patent/CN108519734B/en
Priority claimed from CN201810251903.5A external-priority patent/CN108549845B/en
Application filed by 广东乐芯智能科技有限公司 filed Critical 广东乐芯智能科技有限公司
Publication of WO2019184642A1 publication Critical patent/WO2019184642A1/en

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04DAPPARATUS OR TOOLS SPECIALLY DESIGNED FOR MAKING OR MAINTAINING CLOCKS OR WATCHES
    • G04D7/00Measuring, counting, calibrating, testing or regulating apparatus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection

Definitions

  • the present invention relates to a method and system for determining the position of a surface pointer.
  • the photographed image belongs to the instantaneous action, and the picture is fixed. During the completion of the photographing process, the time is moving. Therefore, there may be some error in this process, and a large number of correction algorithms are needed to correct the time.
  • the present invention provides a method for determining the position of a surface pointer, which uses a mobile phone video capture to identify the current position of the positioning pointer from the data image, and transmits the current position and the angle to be adjusted to the watch via Bluetooth.
  • the watch is adjusted to the correct position according to the instructions.
  • the accuracy of the test is extremely high. The user's use is greatly facilitated and the user experience is improved.
  • a method of determining a position of a surface pointer comprising the steps of:
  • Step one real-time shooting of the surface of the watch to obtain a video
  • Step two identifying a video captured by the camera, the identifying is extracting an image of the video
  • Step 3 positioning the image to position the image in a dial area
  • Step 4 performing positioning processing on the hands of the dial area to obtain a pointer
  • step five the angle at which the pointer deviates from the preset point is determined.
  • the extracting is performed according to the processing speed of the processor. If the current image is not processed, the sent image is skipped and extracted, and the image is processed and then extracted. The first frame of image sent to the processor after completion.
  • the positioning comprises positioning preprocessing, and the positioning preprocessing comprises grading the image to generate a channel gray image from the four-channel image.
  • the Hough transform image processing is used, and the dial is positioned in the gray image according to the shape of the dial to obtain a positioning matrix, and the positioning matrix is used to cut the step.
  • the image extracted in the second image is removed from the region outside the positioning matrix in the image, and the image in the range of the positioning matrix of the image extracted in the second step is retained, which is called a positioning image.
  • the image is edged on the positioning image, so that only the line is left in the positioning image, and the line is searched by the Hough transform to filter the invalid line segment.
  • the processor stores the first threshold and the second threshold:
  • the processor stores the first threshold, the second threshold and the second threshold:
  • the processor stores the first threshold, the second threshold, the second threshold, and the second threshold:
  • a color point is preset in the dial, and the processor performs color recognition on the positioning image to determine the color point, and calculates the connection between the color point and the center point of the dial. The angle of the line and the pointer.
  • steps 2 to 5 processing a subsequent third threshold number of frame images and calculating an angle of the pointer from the color point to obtain an angle of the third threshold number, and taking an angle in which the probability of occurrence is the largest
  • the pointer is offset from the angle of the color point.
  • a system for implementing the above method comprising: a smart watch and a smart phone;
  • the smart watch includes a physical pointer, a driving device for controlling rotation of the physical pointer, and an MCU for controlling the driving device;
  • the smart phone includes a processor and a camera
  • the camera can perform real-time shooting on the surface of the watch to obtain a video
  • the processor includes an image processing unit, the image processing unit may identify the video, and the identifying is to extract an image of the video for recognition;
  • the processor also includes a computing unit that can calculate the position of the pointer to derive an angle of the pointer from the reference point.
  • the invention only needs to solve the algorithm problems of image recognition, noise coming over and time calibration, and the optimization problem which is different for the requirements of the mobile phone processor.
  • the extraction of the surface pointer already has the extraction of the image.
  • the extraction of the image is difficult to determine the position of the pointer more accurately, and the shooting of multiple images is due to the time interval of shooting.
  • the invention adopts the method of video extracting pictures, the video has continuity, and the picture of many frames can be extracted in one second of the video, and when the several frames are processed, the position of the pointer is substantially unchanged.
  • Determining the position of the surface pointer requires the use of an external device such as a smart phone, and requires the smart phone to shoot a unit, the smart watch including a physical pointer, a driving device for controlling the rotation of the physical pointer, and an MCU for controlling the driving device;
  • the smart phone includes a processor and a camera
  • the camera can perform real-time shooting on the surface of the watch to obtain a video
  • the processor includes an image processing unit, the image processing unit may identify the video, and the identifying is to extract an image of the video for recognition;
  • the processor also includes a computing unit that can calculate the position of the pointer to derive an angle of the pointer from the reference point.
  • the surface of the watch is photographed in real time using a photographing device such as a mobile phone, and of course, a mobile phone having an IOS system to obtain a video, and then the video is processed.
  • a photographing device such as a mobile phone
  • a mobile phone having an IOS system to obtain a video
  • the video is processed.
  • the image currently being processed is numbered as the No. 0 image, and the subsequent images are numbered according to the natural number, and the frame image of the multiple of 2, the multiple of 3, or the multiple of 4 is processed. . If the current image is not processed, the current processing can be forcibly stopped, and the image sent by the rule can be processed.
  • grayscale the image After extracting the image, in order to better locate the dial, reduce the interference of other factors (such as light, color), grayscale the image, and generate a 1-channel grayscale image from the original 4-channel image, which can reduce the Mobile phone performance requirements.
  • Gaussian filtering is performed on the grayscale image to smooth the grayscale image.
  • the Hough transform image processing can locate the dial. For example, when the disc is square, a positioning matrix can be located, and the range in the positioning matrix is the dial. range. Or when the dial is circular, a matrix can also be located, and the range within the matrix is the range of the dial. Even when positioning a square matrix when the dial is circular, you can use all black or all white to fill the gap between the circles.
  • the extracted image is clipped using the positioning matrix or the edge of the positioning matrix (the image is not the grayscale image described above, and the second is the color image extracted from the video) such that the colored image has only the region of the dial.
  • the cropped image can be defined as a positioning image.
  • the filtering method for invalid line segments is as follows:
  • Invalid filtering is to determine that the shortest distance from the center point of the dial to the line segment is less than a specific threshold (adjusted according to the actual situation), and that the length of the line segment is greater than or equal to a certain threshold (determined according to the distance of the dial pointer) is considered valid. of. Otherwise, the task line is invalid.
  • the mobile phone sends a signal to the watch, so that the two pointers of the watch are Any of the pointers are rotated a certain angle first.
  • the mobile phone can not be photographed correctly. In order to fit the watch, it is not necessarily a correct scan. You need to find a reference point for the pointer, such as the reference point at 12 o'clock. We can select Set a color point in the direction of 12 o'clock, such as red.
  • the processor uses color recognition to judge the position of the color point (red dot), and confirms that the red dot algorithm is based on the RGB value of the image pixel (0-255), R minus G is greater than or equal to 80 and lacks R minus B. Greater than or equal to 80 is considered a red dot.
  • the minute hand and the hour hand are distinguished.
  • the second hand can also distinguish the second hand.
  • the angle of each hand deviates from 12 o'clock by the center point.
  • the extracted images are all calculated once. After one calculation, the subsequent transmitted frame images are further calculated. For example, 10 times are calculated, and an angle with the highest probability of occurrence in 10 times is taken as the angle at which the pointer deviates from the color point. For example, in 10 times, there are 3 times 14 degrees, 4 times 15 degrees, 3 times 16 degrees, then 15 degrees is the angle at which the pointer deviates from the color point.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Studio Devices (AREA)

Abstract

A method and system for determining the positions of watch face hands. The method comprises the following steps: step one, utilizing a camera of a photographing device to capture in real-time the watch face of a watch to produce a video; step two, the photographing device performs a recognition with respect to the video captured by the camera, the recognition being the recognition of images of the video; step three, the photographing device positions the images so that the images are positioned in a watch dial area; step four, the photographing device performs positioning processing with respect to watch hands of the watch dial area to obtain the hands; nd step five, the photographing device determines the angle at which the hands are offset from a preset point. By means of the described technical solution, first, the positions of the hands of the watch on the watch face can be calculated accurately and in real-time, secondly, no high requirement is placed on a processor of a mobile phone, the recognition is asynchronously processed, thus preventing apps of the mobile phone from lagging; moreover, the employment of a scheme of selectively ignoring image frames allows low-end mobile phones, even if incapable of quickly processing images, to perform smoothly.

Description

一种确定表面指针位置的方法及系统Method and system for determining surface pointer position 技术领域Technical field
本发明涉及确定表面指针位置的方法及系统。The present invention relates to a method and system for determining the position of a surface pointer.
背景技术Background technique
目前智能实体指针手表校准较为麻烦,需要肉眼识别,手动调整。我司曾开发出利用拍照图片进行对时的方法,此方法给予手机拍照对画面的识别非常准的前提。At present, smart entity pointer watch calibration is more troublesome, requires visual recognition and manual adjustment. Our company has developed a method for taking photos with pictures, which gives the mobile phone a very accurate premise for the recognition of the picture.
技术问题technical problem
拍照的图像属于瞬时动作,画面是固定的,在拍完照到对照片处理完成期间,时间是走动的,因此,此过程可能存在一定的误差,需要大量的纠正算法去纠时。The photographed image belongs to the instantaneous action, and the picture is fixed. During the completion of the photographing process, the time is moving. Therefore, there may be some error in this process, and a large number of correction algorithms are needed to correct the time.
技术解决方案Technical solution
基于上述技术问题,本发明提供一种可确定表面指针位置的方法,该方法借助手机视频拍摄,从数据图像中识别定位指针当前位置,并将当前位置及需要调整的角度通过蓝牙发送到手表上面,手表根据指令调整到正确的位置。目前根据测试准确率极高。大大方便的用户的使用,提高了用户体验。Based on the above technical problem, the present invention provides a method for determining the position of a surface pointer, which uses a mobile phone video capture to identify the current position of the positioning pointer from the data image, and transmits the current position and the angle to be adjusted to the watch via Bluetooth. The watch is adjusted to the correct position according to the instructions. Currently, the accuracy of the test is extremely high. The user's use is greatly facilitated and the user experience is improved.
本发明的具体技术方案如下:The specific technical solutions of the present invention are as follows:
一种确定表面指针位置的方法,其特征在于,所述方法包括如下步骤:A method of determining a position of a surface pointer, the method comprising the steps of:
步骤一,对手表的表面进行实时拍摄得到视频;Step one, real-time shooting of the surface of the watch to obtain a video;
步骤二,对摄像头拍摄的视频进行识别,所述识别为提取所述视频的图像;Step two, identifying a video captured by the camera, the identifying is extracting an image of the video;
步骤三,对所述图像进行定位,使所述图像定位在表盘区域;Step 3: positioning the image to position the image in a dial area;
步骤四,对所述表盘区域的表针进行定位处理,得到指针;Step 4: performing positioning processing on the hands of the dial area to obtain a pointer;
步骤五,确定所述指针偏离预设点的角度。In step five, the angle at which the pointer deviates from the preset point is determined.
进一步地,在所述步骤二中,所述提取根据所述处理器的处理速度进行,若当前图像未处理完毕,则发送过来的图像略过不提取进行识别,直至当前图像处理完毕再提取处理完毕之后发送到处理器的第一帧图像。Further, in the second step, the extracting is performed according to the processing speed of the processor. If the current image is not processed, the sent image is skipped and extracted, and the image is processed and then extracted. The first frame of image sent to the processor after completion.
进一步地,在所述步骤三中,所述定位包括定位预处理,所述定位预处理包括将图像进行灰度化,使其由四通道图像生成一通道的灰度图像。Further, in the third step, the positioning comprises positioning preprocessing, and the positioning preprocessing comprises grading the image to generate a channel gray image from the four-channel image.
进一步地,在所述步骤三中,预处理之后,采用霍夫变换图像处理,根据表盘的形状在所述灰度图像中对表盘进行定位,得到定位矩阵,用该定位矩阵去裁剪所述步骤二中提取的图像,去掉所述图像中处于定位矩阵之外的区域,保留所述步骤二中提取的图像的定位矩阵范围内的图像,称为定位图像。Further, in the third step, after the pre-processing, the Hough transform image processing is used, and the dial is positioned in the gray image according to the shape of the dial to obtain a positioning matrix, and the positioning matrix is used to cut the step. The image extracted in the second image is removed from the region outside the positioning matrix in the image, and the image in the range of the positioning matrix of the image extracted in the second step is retained, which is called a positioning image.
进一步地,在所述步骤四中,对所述定位图像进行图像边缘化处理,使得所述定位图像仅剩下线条,采用霍夫变换寻找直线,对无效的线段进行过滤。Further, in the step 4, the image is edged on the positioning image, so that only the line is left in the positioning image, and the line is searched by the Hough transform to filter the invalid line segment.
进一步地,所述对无效的线段进行过滤的方法如下:Further, the method for filtering the invalid line segments is as follows:
当指针只有一个时,判断表盘中心点到线段的最短距离H以及线段的长度L,所述处理器存储有第一阈值和第二阈值:When there is only one pointer, the shortest distance H from the center point of the dial to the line segment and the length L of the line segment are determined, and the processor stores the first threshold and the second threshold:
若所述H小于所述第一阈值,且所述L大于所述第二阈值,则判断该线条为指针;If the H is smaller than the first threshold, and the L is greater than the second threshold, determining that the line is a pointer;
当指针具有两个时,判断表盘中心点到线段的最短距离H以及线段的长度L,所述处理器存储有第一阈值、第二一阈值和第二二阈值:When the pointer has two, the shortest distance H from the center point of the dial to the line segment and the length L of the line segment are determined, and the processor stores the first threshold, the second threshold and the second threshold:
若所述H小于所述第一阈值,且所述L大于所述第二一阈值并且小于所述第二二阈值,则判断该线条为时针指针;If the H is less than the first threshold, and the L is greater than the second threshold and less than the second threshold, determining that the line is an hour hand pointer;
若所述H小于所述第一阈值,且所述L大于所述所述第二二阈值,则判断该线条为分针指针;If the H is smaller than the first threshold, and the L is greater than the second threshold, determining that the line is a minute hand pointer;
当指针有三个时,判断表盘中心点到线段的最短距离H以及线段的长度L,所述处理器存储有第一阈值、第二一阈值、第二二阈值和第二三阈值:When there are three pointers, the shortest distance H from the center point of the dial to the line segment and the length L of the line segment are determined, and the processor stores the first threshold, the second threshold, the second threshold, and the second threshold:
若所述H小于所述第一阈值,且所述L大于所述第二一阈值并且小于所述第二二阈值,则判断该线条为时针指针;If the H is less than the first threshold, and the L is greater than the second threshold and less than the second threshold, determining that the line is an hour hand pointer;
若所述H小于所述第一阈值,且所述L大于所述第二二阈值并且小于所述第二三阈值,则判断该线条为分针指针;If the H is smaller than the first threshold, and the L is greater than the second two threshold and less than the second three threshold, determining that the line is a minute hand pointer;
若所述H小于所述第一阈值,且所述L大于所述所述第二三阈值,则判断该线条为秒针指针。And if the H is smaller than the first threshold, and the L is greater than the second three threshold, determining that the line is a second hand pointer.
进一步地,在所述步骤五中,在所述表盘中预设一个颜色点,所述处理器对所述定位图像进行颜色识别判断出该颜色点,并计算该颜色点与表盘中心点的连线与指针的角度。Further, in the step 5, a color point is preset in the dial, and the processor performs color recognition on the positioning image to determine the color point, and calculates the connection between the color point and the center point of the dial. The angle of the line and the pointer.
进一步地,重复步骤二至步骤五,对后续的第三阈值数量的帧图像进行处理并计算指针偏离所述颜色点的角度,得到第三阈值数量的角度,取其中出现概率最大的一个角度作为该指针偏离所述颜色点的角度。Further, repeating steps 2 to 5, processing a subsequent third threshold number of frame images and calculating an angle of the pointer from the color point to obtain an angle of the third threshold number, and taking an angle in which the probability of occurrence is the largest The pointer is offset from the angle of the color point.
实现上述方法的系统,所述系统包括:智能手表和智能手机;A system for implementing the above method, the system comprising: a smart watch and a smart phone;
所述智能手表包括实体指针、控制实体指针转动的驱动装置以及控制驱动装置的MCU;The smart watch includes a physical pointer, a driving device for controlling rotation of the physical pointer, and an MCU for controlling the driving device;
所述智能手机包括处理器和摄像头;The smart phone includes a processor and a camera;
所述摄像头可对所述手表的表面进行实时拍摄得到视频;The camera can perform real-time shooting on the surface of the watch to obtain a video;
所述处理器包括图像处理单元,所述图像处理单元可对所述视频进行识别,所述识别为提取所述视频的图像进行识别;The processor includes an image processing unit, the image processing unit may identify the video, and the identifying is to extract an image of the video for recognition;
所述处理器还包括计算单元,所述计算单元可对指针的位置进行计算,得出指针与参考点的角度。The processor also includes a computing unit that can calculate the position of the pointer to derive an angle of the pointer from the reference point.
有益效果Beneficial effect
通过上述的技术方案,一是可以精确地、实时地计算出手表的指针在表面所处的位置,二是对手机的处理器要求不高,识别采用异步处理,让手机APP不会变卡,并且采用选择性忽略图像帧方式,让低端手机,就算不能快速地处理图像,也可以表现地非常流畅。Through the above technical solution, one can accurately and real-time calculate the position of the pointer of the watch on the surface, and secondly, the processor requirements of the mobile phone are not high, and the recognition adopts asynchronous processing, so that the mobile APP does not change the card. And the use of selective ignore image frame mode, so that low-end mobile phones, even if you can not quickly process the image, can also be very smooth.
本发明的实施方式Embodiments of the invention
以下对本发明的技术方案进行详尽地阐述。The technical solutions of the present invention are described in detail below.
本发明只要解决图像识别、噪声过来及时间校准三方面的算法问题,以及实际对于手机处理器的要求不同的优化问题。The invention only needs to solve the algorithm problems of image recognition, noise coming over and time calibration, and the optimization problem which is different for the requirements of the mobile phone processor.
表面指针的提取已经有了图像的提取,但是,图像的提取由于存在光线、颜色的问题,单张图片比较难以比较准确地确定指针的位置,而拍摄多张图片则由于拍摄的时间间隔问题,导致指针存在非常大的几率走动。The extraction of the surface pointer already has the extraction of the image. However, due to the problem of light and color, the extraction of the image is difficult to determine the position of the pointer more accurately, and the shooting of multiple images is due to the time interval of shooting. Causes the pointer to have a very large chance of moving around.
本发明采用视频提取图片的方式,视频具有连续性,且视频中1秒钟可以提取很多帧的图片,对其中的若干帧进行处理时,指针的位置基本不变。The invention adopts the method of video extracting pictures, the video has continuity, and the picture of many frames can be extracted in one second of the video, and when the several frames are processed, the position of the pointer is substantially unchanged.
确定表面指针位置除了智能手表,需要借助到如智能手机的外界设备,要求智能手机又拍摄单元,所述智能手表包括实体指针、控制实体指针转动的驱动装置以及控制驱动装置的MCU;Determining the position of the surface pointer, in addition to the smart watch, requires the use of an external device such as a smart phone, and requires the smart phone to shoot a unit, the smart watch including a physical pointer, a driving device for controlling the rotation of the physical pointer, and an MCU for controlling the driving device;
所述智能手机包括处理器和摄像头;The smart phone includes a processor and a camera;
所述摄像头可对所述手表的表面进行实时拍摄得到视频;The camera can perform real-time shooting on the surface of the watch to obtain a video;
所述处理器包括图像处理单元,所述图像处理单元可对所述视频进行识别,所述识别为提取所述视频的图像进行识别;The processor includes an image processing unit, the image processing unit may identify the video, and the identifying is to extract an image of the video for recognition;
所述处理器还包括计算单元,所述计算单元可对指针的位置进行计算,得出指针与参考点的角度。The processor also includes a computing unit that can calculate the position of the pointer to derive an angle of the pointer from the reference point.
具体的实现方式如下:The specific implementation is as follows:
首先,利用拍摄装置,如手机,当然,更优选地是具有IOS系统的手机对手表的表面进行实时拍摄,得到视频,然后对视频进行处理。First, the surface of the watch is photographed in real time using a photographing device such as a mobile phone, and of course, a mobile phone having an IOS system to obtain a video, and then the video is processed.
对视频进行处理时,由于视频拍摄的帧数较多,限于处理器的处理能力,最理想的状态是处理器对每帧图像都进行处理计算,但是实际上,在对图像进行处理的时候,处理器很有可能在下一帧图像发过来的时候对当前图像还没有处理完,此时,处理器可忽略该发过来的下一帧图像,直至处理器处理完当前的图像。When processing video, because the number of frames captured by the video is large, it is limited to the processing power of the processor. The most ideal state is that the processor processes and calculates each frame of image, but in fact, when processing the image, It is very likely that the processor has not processed the current image when the next frame image is sent. At this time, the processor can ignore the next frame image sent until the processor processes the current image.
当然,也可以进行强制处理,如按照规律,将当前正在处理的图像编号为第0号图像,后面的图像按照自然数进行编号,取2的倍数、3的倍数或者4的倍数的帧图像进行处理。当前图像未处理完,可强制停止当前处理,进而处理按规律发送过来的图像。Of course, it is also possible to perform forced processing. For example, according to the law, the image currently being processed is numbered as the No. 0 image, and the subsequent images are numbered according to the natural number, and the frame image of the multiple of 2, the multiple of 3, or the multiple of 4 is processed. . If the current image is not processed, the current processing can be forcibly stopped, and the image sent by the rule can be processed.
提取好图像后,为了更好的定位到表盘,减少其他因素(比如光线、颜色)的干扰,对图像进行灰度化,由原来的4通道图像,生成1通道的灰度图像,可以降低对手机性能的要求。再针对灰度图像进行高斯滤波处理,平滑灰度图像。After extracting the image, in order to better locate the dial, reduce the interference of other factors (such as light, color), grayscale the image, and generate a 1-channel grayscale image from the original 4-channel image, which can reduce the Mobile phone performance requirements. Gaussian filtering is performed on the grayscale image to smooth the grayscale image.
由于表盘具有特殊性,具有特定的几何图形,所述采用霍夫变换图像处理可以对表盘进行定位,如当变盘是方形时,可以定位出一个定位矩阵,该定位矩阵内的范围就是表盘的范围。或者当表盘是圆形的时候,也可以定位出一个矩阵,该矩阵内的范围就是表盘的范围。甚至,当表盘是圆形的时候定位出一个方形的矩阵时,可以采用全黑或者全白去填充圆方之间的空缺。Due to the particularity of the dial and the specific geometry, the Hough transform image processing can locate the dial. For example, when the disc is square, a positioning matrix can be located, and the range in the positioning matrix is the dial. range. Or when the dial is circular, a matrix can also be located, and the range within the matrix is the range of the dial. Even when positioning a square matrix when the dial is circular, you can use all black or all white to fill the gap between the circles.
利用定位矩阵或者定位矩阵的边缘去裁剪提取的图像(该图像并非上述的灰度图像,二是从视频中提取出来的具有颜色的图像),使得该具有颜色的图像只有表盘的区域。裁剪后的图像可以定义为定位图像。The extracted image is clipped using the positioning matrix or the edge of the positioning matrix (the image is not the grayscale image described above, and the second is the color image extracted from the video) such that the colored image has only the region of the dial. The cropped image can be defined as a positioning image.
然后对该定位图像进行边缘化处理,使得图像仅剩下线条,再利用霍夫线条变换去寻找直线,此时寻找的直线非常多,需要过滤掉无效的线段。无效线段的过滤方法如下:Then, the positioning image is edged, so that only the lines are left in the image, and then the Hough line transformation is used to find the straight line. At this time, there are many straight lines to be searched, and the invalid line segments need to be filtered out. The filtering method for invalid line segments is as follows:
过滤无效采用的方法是,判断表盘中心点到线段的最短距离小于特定的阀值(根据实际情况调整),并且,线段长度大于等于某个阀值(根据表盘指针的距离长度决定)认为是有效的。否则,则任务线条是无效的。Invalid filtering is to determine that the shortest distance from the center point of the dial to the line segment is less than a specific threshold (adjusted according to the actual situation), and that the length of the line segment is greater than or equal to a certain threshold (determined according to the distance of the dial pointer) is considered valid. of. Otherwise, the task line is invalid.
当然,在实际操作的过程中,可能存在两个指针重合或者基本重合(两指针偏离的角度不超过2度或者更小的角度),则手机发送信号至手表,让手表的上述两个指针中的任一指针先转动一定的角度。Of course, in the actual operation process, there may be two pointers coincident or substantially coincident (the angle between the two pointers does not exceed 2 degrees or less), then the mobile phone sends a signal to the watch, so that the two pointers of the watch are Any of the pointers are rotated a certain angle first.
在拍摄的时候,大部分时候,手机可手表均不是正对拍摄的,为了适配手表不一定是摆正扫描,需要给指针找一个基准点,如12点钟方向的基准点,我们可选取在12点钟的方向设置一个具有颜色的颜色点,如红色。At the time of shooting, most of the time, the mobile phone can not be photographed correctly. In order to fit the watch, it is not necessarily a correct scan. You need to find a reference point for the pointer, such as the reference point at 12 o'clock. We can select Set a color point in the direction of 12 o'clock, such as red.
处理器采用颜色识别的方式,对颜色点(红色点)的位置进行判断,确认红色点算法是根据图像像素的RGB值(0-255),R减去G大于等于80并缺R减去B大于等于80认为是红色点。The processor uses color recognition to judge the position of the color point (red dot), and confirms that the red dot algorithm is based on the RGB value of the image pixel (0-255), R minus G is greater than or equal to 80 and lacks R minus B. Greater than or equal to 80 is considered a red dot.
根据线段的长度和角度区别分针、时针,有秒针的还可以区分秒针,最终结合中心点算出每个指针偏离12点钟的角度。According to the length and angle of the line segment, the minute hand and the hour hand are distinguished. The second hand can also distinguish the second hand. Finally, the angle of each hand deviates from 12 o'clock by the center point.
提取的图像都计算一次,一个计算完之后,对后续传送的帧图像再进行计算,如计算10次,取10次中出现概率最大的一个角度作为指针偏离颜色点的角度。如10次中,出现了3次14度,4次15度,3次16度,则取15度为该指针偏离颜色点的角度。The extracted images are all calculated once. After one calculation, the subsequent transmitted frame images are further calculated. For example, 10 times are calculated, and an angle with the highest probability of occurrence in 10 times is taken as the angle at which the pointer deviates from the color point. For example, in 10 times, there are 3 times 14 degrees, 4 times 15 degrees, 3 times 16 degrees, then 15 degrees is the angle at which the pointer deviates from the color point.
通过上述的技术方案,一是可以精确地、实时地计算出手表的指针在表面所处的位置,二是对手机的处理器要求不高,识别采用异步处理,让手机APP不会变卡,并且采用选择性忽略图像帧方式,让低端手机,就算不能快速地处理图像,也可以表现地非常流畅。Through the above technical solution, one can accurately and real-time calculate the position of the pointer of the watch on the surface, and secondly, the processor requirements of the mobile phone are not high, and the recognition adopts asynchronous processing, so that the mobile APP does not change the card. And the use of selective ignore image frame mode, so that low-end mobile phones, even if you can not quickly process the image, can also be very smooth.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

  1. 一种确定表面指针位置的方法,其特征在于,所述方法包括如下步骤:A method of determining a position of a surface pointer, the method comprising the steps of:
    步骤一,对手表的表面进行实时拍摄得到视频;Step one, real-time shooting of the surface of the watch to obtain a video;
    步骤二,对摄像头拍摄的视频进行识别,所述识别为提取所述视频的图像;Step two, identifying a video captured by the camera, the identifying is extracting an image of the video;
    步骤三,对所述图像进行定位,使所述图像定位在表盘区域;Step 3: positioning the image to position the image in a dial area;
    步骤四,对所述表盘区域的表针进行定位处理,得到指针;Step 4: performing positioning processing on the hands of the dial area to obtain a pointer;
    步骤五,确定所述指针偏离预设点的角度。In step five, the angle at which the pointer deviates from the preset point is determined.
  2. 根据权利要求1所述的一种确定表面指针位置的方法,其特征在于,在所述步骤二中,所述提取根据所述处理器的处理速度进行,若当前图像未处理完毕,则发送过来的图像略过不提取进行识别,直至当前图像处理完毕再提取处理完毕之后发送到处理器的第一帧图像。The method for determining the position of a surface pointer according to claim 1, wherein in the second step, the extracting is performed according to a processing speed of the processor, and if the current image is not processed, the sending is performed. The image is skipped without being extracted for recognition until the first frame image is sent to the processor after the current image is processed and the extraction process is completed.
  3. 根据权利要求1所述的一种确定表面指针位置的方法,其特征在于,在所述步骤三中,所述定位包括定位预处理,所述定位预处理包括将图像进行灰度化,使其由四通道图像生成一通道的灰度图像。A method for determining a position of a surface pointer according to claim 1, wherein in said step three, said positioning comprises positioning preprocessing, said positioning preprocessing comprising grading an image to make it A channel of grayscale image is generated from a four-channel image.
  4. 根据权利要求3所述的一种确定表面指针位置的方法,其特征在于,在所述步骤三中,预处理之后,采用霍夫变换图像处理,根据表盘的形状在所述灰度图像中对表盘进行定位,得到定位矩阵,用该定位矩阵去裁剪所述步骤二中提取的图像,去掉所述图像中处于定位矩阵之外的区域,保留所述步骤二中提取的图像的定位矩阵范围内的图像,称为定位图像。A method for determining a position of a surface pointer according to claim 3, wherein in said step three, after pre-processing, Hough transform image processing is employed, and the grayscale image is paired according to the shape of the dial. The dial is positioned to obtain a positioning matrix, and the positioning matrix is used to crop the image extracted in the second step, and the area outside the positioning matrix in the image is removed, and the positioning matrix of the image extracted in the second step is retained. The image is called a positioning image.
  5. 根据权利要求4所述的一种确定表面指针位置的方法,其特征在于,在所述步骤四中,对所述定位图像进行图像边缘化处理,使得所述定位图像仅剩下线条,采用霍夫变换寻找直线,对无效的线段进行过滤。The method for determining the position of a surface pointer according to claim 4, wherein in the step four, image edge processing is performed on the positioning image, so that only the line is left in the positioning image, The transformation searches for a line and filters the invalid line segments.
  6. 根据权利要求5所述的一种确定表面指针位置的方法,其特征在于,所述对无效的线段进行过滤的方法如下:A method for determining a position of a surface pointer according to claim 5, wherein the method of filtering the invalid line segments is as follows:
    当指针只有一个时,判断表盘中心点到线段的最短距离H以及线段的长度L,所述处理器存储有第一阈值和第二阈值:When there is only one pointer, the shortest distance H from the center point of the dial to the line segment and the length L of the line segment are determined, and the processor stores the first threshold and the second threshold:
    若所述H小于所述第一阈值,且所述L大于所述第二阈值,则判断该线条为指针;If the H is smaller than the first threshold, and the L is greater than the second threshold, determining that the line is a pointer;
    当指针具有两个时,判断表盘中心点到线段的最短距离H以及线段的长度L,所述处理器存储有第一阈值、第二一阈值和第二二阈值:When the pointer has two, the shortest distance H from the center point of the dial to the line segment and the length L of the line segment are determined, and the processor stores the first threshold, the second threshold and the second threshold:
    若所述H小于所述第一阈值,且所述L大于所述第二一阈值并且小于所述第二二阈值,则判断该线条为时针指针;If the H is less than the first threshold, and the L is greater than the second threshold and less than the second threshold, determining that the line is an hour hand pointer;
    若所述H小于所述第一阈值,且所述L大于所述所述第二二阈值,则判断该线条为分针指针;If the H is smaller than the first threshold, and the L is greater than the second threshold, determining that the line is a minute hand pointer;
    当指针有三个时,判断表盘中心点到线段的最短距离H以及线段的长度L,所述处理器存储有第一阈值、第二一阈值、第二二阈值和第二三阈值:When there are three pointers, the shortest distance H from the center point of the dial to the line segment and the length L of the line segment are determined, and the processor stores the first threshold, the second threshold, the second threshold, and the second threshold:
    若所述H小于所述第一阈值,且所述L大于所述第二一阈值并且小于所述第二二阈值,则判断该线条为时针指针;If the H is less than the first threshold, and the L is greater than the second threshold and less than the second threshold, determining that the line is an hour hand pointer;
    若所述H小于所述第一阈值,且所述L大于所述第二二阈值并且小于所述第二三阈值,则判断该线条为分针指针;If the H is smaller than the first threshold, and the L is greater than the second two threshold and less than the second three threshold, determining that the line is a minute hand pointer;
    若所述H小于所述第一阈值,且所述L大于所述所述第二三阈值,则判断该线条为秒针指针。And if the H is smaller than the first threshold, and the L is greater than the second three threshold, determining that the line is a second hand pointer.
  7. 根据权利要求6所述的一种确定表面指针位置的方法,其特征在于,在所述步骤五中,在所述表盘中预设一个颜色点,所述处理器对所述定位图像进行颜色识别判断出该颜色点,并计算该颜色点与表盘中心点的连线与指针的角度。A method for determining a position of a surface pointer according to claim 6, wherein in the step five, a color point is preset in the dial, and the processor performs color recognition on the positioning image. The color point is determined, and the angle between the color point and the center point of the dial is calculated.
  8. 根据权利要求7所述的一种确定表面指针位置的方法,其特征在于,重复步骤二至步骤五,对后续的第三阈值数量的帧图像进行处理并计算指针偏离所述颜色点的角度,得到第三阈值数量的角度,取其中出现概率最大的一个角度作为该指针偏离所述颜色点的角度。A method for determining a position of a surface pointer according to claim 7, wherein steps 2 to 5 are repeated to process a subsequent third threshold number of frame images and calculate an angle at which the pointer deviates from the color point. An angle of the third threshold number is obtained, and an angle in which the probability of occurrence is the largest is taken as the angle at which the pointer deviates from the color point.
  9. 实现上述权利要求1-8中任一项所述的方法的系统,所述系统包括:智能手表和智能手机;A system for implementing the method of any of the preceding claims 1-8, the system comprising: a smart watch and a smart phone;
    所述智能手表包括实体指针、控制实体指针转动的驱动装置以及控制驱动装置的MCU;The smart watch includes a physical pointer, a driving device for controlling rotation of the physical pointer, and an MCU for controlling the driving device;
    所述智能手机包括处理器和摄像头;The smart phone includes a processor and a camera;
    所述摄像头可对所述手表的表面进行实时拍摄得到视频;The camera can perform real-time shooting on the surface of the watch to obtain a video;
    所述处理器包括图像处理单元,所述图像处理单元可对所述视频进行识别,所述识别为提取所述视频的图像进行识别;The processor includes an image processing unit, the image processing unit may identify the video, and the identifying is to extract an image of the video for recognition;
    所述处理器还包括计算单元,所述计算单元可对指针的位置进行计算,得出指针与参考点的角度。The processor also includes a computing unit that can calculate the position of the pointer to derive an angle of the pointer from the reference point.
PCT/CN2019/076213 2018-03-26 2019-02-27 Method and system for determining positions of watch face hands WO2019184642A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810252412.2A CN108519734B (en) 2018-03-26 2018-03-26 A kind of system of determining surface pointer position
CN201810251903.5A CN108549845B (en) 2018-03-26 2018-03-26 Method for determining surface pointer position
CN201810252412.2 2018-03-26
CN201810251903.5 2018-03-26

Publications (1)

Publication Number Publication Date
WO2019184642A1 true WO2019184642A1 (en) 2019-10-03

Family

ID=68060922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/076213 WO2019184642A1 (en) 2018-03-26 2019-02-27 Method and system for determining positions of watch face hands

Country Status (1)

Country Link
WO (1) WO2019184642A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114202658A (en) * 2021-12-06 2022-03-18 杭州铭翰科技有限公司 Water meter reading video identification technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955011A (en) * 2016-04-21 2016-09-21 深圳欧德蒙科技有限公司 Method and device for intelligently calibrating time
CN106446913A (en) * 2016-09-20 2017-02-22 山东省计量科学研究院 Pointer position extracting method of multi-dial pointer type instrument
CN108519734A (en) * 2018-03-26 2018-09-11 广东乐芯智能科技有限公司 A kind of system of determining surface pointer position
CN108549845A (en) * 2018-03-26 2018-09-18 广东乐芯智能科技有限公司 A kind of method of determining surface pointer position

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955011A (en) * 2016-04-21 2016-09-21 深圳欧德蒙科技有限公司 Method and device for intelligently calibrating time
CN106446913A (en) * 2016-09-20 2017-02-22 山东省计量科学研究院 Pointer position extracting method of multi-dial pointer type instrument
CN108519734A (en) * 2018-03-26 2018-09-11 广东乐芯智能科技有限公司 A kind of system of determining surface pointer position
CN108549845A (en) * 2018-03-26 2018-09-18 广东乐芯智能科技有限公司 A kind of method of determining surface pointer position

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114202658A (en) * 2021-12-06 2022-03-18 杭州铭翰科技有限公司 Water meter reading video identification technology

Similar Documents

Publication Publication Date Title
US20200074646A1 (en) Method for obtaining image tracking points and device and storage medium thereof
CN108519734B (en) A kind of system of determining surface pointer position
CN107368806B (en) Image rectification method, image rectification device, computer-readable storage medium and computer equipment
TWI405143B (en) Object image correcting apparatus and method of identification
CN108965839B (en) Method and device for automatically adjusting projection picture
CN111723801B (en) Method and system for detecting and correcting target in fisheye camera picture
CN102075785B (en) Method for correcting wide-angle camera lens distortion of automatic teller machine (ATM)
CN113766209B (en) Camera offset processing method and device
TWI804988B (en) Identification object determination method, device, equipment and storage medium
CN108549845B (en) Method for determining surface pointer position
CN111028205A (en) Eye pupil positioning method and device based on binocular ranging
CN110261069B (en) Detection method for optical lens
JP2015212943A (en) Device for detecting color chart in image and detection method
WO2020034672A1 (en) Method and apparatus for determining region of interest of user in image
CN107835397A (en) A kind of method of more camera lens audio video synchronizations
JP2008130095A (en) Face area detection device and correction method for photograph printing
CN110781712B (en) Human head space positioning method based on human face detection and recognition
WO2019184642A1 (en) Method and system for determining positions of watch face hands
CN113822927B (en) Face detection method, device, medium and equipment suitable for weak quality image
CN114037087B (en) Model training method and device, depth prediction method and device, equipment and medium
CN117522803A (en) Bridge component accurate positioning method based on binocular vision and target detection
CN113938578A (en) Image blurring method, storage medium and terminal device
CN105093480A (en) Method for improving optical lens focusing accuracy
CN103455998A (en) Method and device for detecting shadows in video image
CN108682034B (en) Android system-based smart watch entity pointer position determination method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19776071

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19776071

Country of ref document: EP

Kind code of ref document: A1