CN108549845B - Method for determining surface pointer position - Google Patents

Method for determining surface pointer position Download PDF

Info

Publication number
CN108549845B
CN108549845B CN201810251903.5A CN201810251903A CN108549845B CN 108549845 B CN108549845 B CN 108549845B CN 201810251903 A CN201810251903 A CN 201810251903A CN 108549845 B CN108549845 B CN 108549845B
Authority
CN
China
Prior art keywords
image
pointer
threshold value
positioning
line
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810251903.5A
Other languages
Chinese (zh)
Other versions
CN108549845A (en
Inventor
苏江
范凤华
黄树志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WUHAN SUNON ELECTRONIC Co.,Ltd.
Original Assignee
Wuhan Sunon Electronic Co ltd
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 Wuhan Sunon Electronic Co ltd filed Critical Wuhan Sunon Electronic Co ltd
Priority to CN201810251903.5A priority Critical patent/CN108549845B/en
Publication of CN108549845A publication Critical patent/CN108549845A/en
Priority to PCT/CN2019/076213 priority patent/WO2019184642A1/en
Application granted granted Critical
Publication of CN108549845B publication Critical patent/CN108549845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Abstract

A method of determining the position of a surface pointer, the method comprising the steps of: the method comprises the following steps that firstly, a camera of a shooting device is used for shooting the surface of a watch in real time to obtain a video; secondly, the shooting device identifies the video shot by the camera, and the identification is carried out by extracting the image of the video; thirdly, the shooting device positions the image to enable the image to be positioned in a dial area; fourthly, the shooting device carries out positioning processing on the pointer in the dial area to obtain a pointer; and fifthly, the shooting device determines the angle of the pointer deviating from the preset point. Through the technical scheme, firstly, the position of the pointer of the watch on the surface can be accurately calculated in real time, secondly, the requirement on the processor of the mobile phone is not high, asynchronous processing is adopted for identification, the APP of the mobile phone cannot be changed, and moreover, the image frame mode is selectively ignored, so that the low-end mobile phone can express very smoothly even if the image cannot be quickly processed.

Description

Method for determining surface pointer position
Technical Field
The invention relates to a method of determining the position of a surface pointer.
Background
At present, the calibration of an intelligent entity pointer watch is troublesome, and the intelligent entity pointer watch needs to be identified by naked eyes and manually adjusted. I developed a method for timing by using a photographed picture, which gives the premise that the recognition of the picture by photographing the picture by a mobile phone is very accurate, and the photographed picture belongs to instant action, and is fixed, and the time is ambulatory during the period of finishing photographing and processing the picture, so that a certain error may exist in the process, and a large amount of correction algorithms are needed for correction.
Disclosure of Invention
Based on the technical problem, the invention provides a method for determining the position of a surface pointer, which is characterized in that the current position of the pointer is identified and positioned from a data image by means of video shooting of a mobile phone, the current position and the angle to be adjusted are sent to a watch through Bluetooth, and the watch is adjusted to the correct position according to an instruction. The accuracy rate is extremely high according to the test at present. The user experience is improved due to the great convenience of the user.
The specific technical scheme of the invention is as follows:
a method of determining the position of a surface pointer, the method comprising the steps of:
the method comprises the following steps that firstly, a camera of a shooting device is used for shooting the surface of a watch in real time to obtain a video;
secondly, the shooting device identifies the video shot by the camera, and the identification is carried out by extracting the image of the video;
thirdly, the shooting device positions the image to enable the image to be positioned in a dial area;
fourthly, the shooting device carries out positioning processing on the pointer in the dial area to obtain a pointer;
and fifthly, the shooting device determines the angle of the pointer deviating from the preset point.
Further, the camera is a mobile phone including a processor and a video camera, and preferably may be a mobile phone with an IOS system.
Further, in the second step, the processor extracts the image of the video according to a rule, specifically: and numbering the image currently being processed as 0, and extracting each frame of image of the video, or extracting the image with odd number or even number, or extracting the image with the number being multiple of 3, or extracting the image with the number being multiple of 4.
Further, in the second step, the extraction is performed according to the processing speed of the processor, and if the current image is not processed, the sent image is skipped over and is not extracted for recognition until the current image is processed and then the first frame image is sent to the processor after the extraction processing is finished.
Further, in the third step, the positioning includes positioning preprocessing, and the positioning preprocessing includes graying the image so that a 1-channel grayscale image is generated from the 4-channel image. When the calculation speed required by the processor is evaluated for multiple times, factors such as light, color and the like are found to have great obstacles to the subsequent extraction of the pointer, so that the conventional 4-channel image is creatively and directly reduced to the 1-channel gray image for processing, the processing speed is high, and the requirement on the performance of the mobile phone is reduced.
Further, Gaussian filtering processing is carried out on the gray level image to obtain a smooth gray level image.
Further, in the third step, after the preprocessing, the hough transform image processing is adopted, the dial is positioned in the grayscale image according to the shape of the dial, so as to obtain a positioning matrix, the positioning matrix is used for cutting the image extracted in the second step, and the area outside the positioning matrix in the image is removed, including the image in the positioning matrix range of the image extracted in the second step, so as to be called as a positioning image.
Further, in the fourth step, the positioning image is subjected to image marginalization processing, so that only lines are left in the positioning image. Since all the hands are straight, only the line needs to be reserved for pertinence.
Further, in the fourth step, a hough transform is adopted to find a straight line, and invalid line segments are filtered.
Further, the method for filtering invalid line segments is as follows: judging the shortest distance H from the central point of the dial to the line segment and the length L of the line segment, wherein the processor stores a first threshold value and a second threshold value:
if the H is smaller than the first threshold value and the L is larger than the second threshold value, the line is judged to be a pointer, and the line segments which are not pointers are filtered.
Further, the second threshold includes a second first threshold and a second threshold:
if the H is smaller than the first threshold value, and the L is larger than the second first threshold value and smaller than the second threshold value, judging that the line is an hour hand pointer;
if the H is smaller than the first threshold value and the L is larger than the second threshold value, judging that the line is a minute hand pointer;
the processor filters out segments that are not pointers.
Further, the second threshold includes a second first threshold, a second threshold, and a second third threshold:
if the H is smaller than the first threshold value, and the L is larger than the second first threshold value and smaller than the second threshold value, judging that the line is an hour hand pointer;
if the H is smaller than the first threshold value, and the L is larger than the second threshold value and smaller than the second third threshold value, judging that the line is a minute hand pointer;
if the H is smaller than the first threshold value and the L is larger than the second third threshold value, judging that the line is a second hand pointer;
the processor filters out segments that are not pointers.
Further, in the fifth step, a color point is preset in the dial, the processor performs color recognition on the positioning image to determine the color point, and calculates an angle between a connecting line of the color point and a center point of the dial and the pointer.
Further, the preset color point is a color point of the 12 o' clock position of the dial.
Further, repeating the second step to the fifth step, processing the subsequent frame images with the third threshold number, calculating the angles of the pointer deviating from the color point to obtain the angles with the third threshold number, and taking the angle with the maximum occurrence probability as the angle of the pointer deviating from the color point.
Further, the third threshold is not less than 10.
Through the technical scheme, firstly, the position of the pointer of the watch on the surface can be accurately calculated in real time, secondly, the requirement on the processor of the mobile phone is not high, asynchronous processing is adopted for identification, the APP of the mobile phone cannot be changed, and moreover, the image frame mode is selectively ignored, so that the low-end mobile phone can express very smoothly even if the image cannot be quickly processed.
Detailed Description
The technical solution of the present invention is explained in detail below.
The invention only needs to solve the algorithm problems of image recognition, noise coming and time calibration and the optimization problem of different requirements of the mobile phone processor.
The extraction of the surface pointer has the image extraction, however, due to the problems of light and color in the image extraction, a single picture is difficult to accurately determine the position of the pointer, and the pointer has a very high possibility to move due to the problem of time intervals in the shooting of multiple pictures.
The invention adopts a mode of extracting pictures from the video, the video has continuity, and a plurality of frames of pictures can be extracted from the video within 1 second, and the position of the pointer is basically unchanged when a plurality of frames are processed.
The specific implementation mode is as follows:
first, the watch surface is photographed in real time using a photographing device, such as a mobile phone, and more preferably, a mobile phone with an IOS system, to obtain a video, and then the video is processed.
When processing a video, the number of frames taken by the video is large, and the processing capability of the processor is limited, and the most ideal state is that the processor performs processing calculation on each frame of image, but actually, when processing an image, the processor is likely to not process the current image when the next frame of image is sent, and at this time, the processor can ignore the sent next frame of image until the processor finishes processing the current image.
Of course, it is also possible to perform forced processing, for example, by numbering the currently processed image as the image No. 0 regularly, numbering the subsequent images by natural numbers, and processing the frame images by taking multiples of 2, 3, or 4. If the current image is not processed, the current processing can be forcibly stopped, and the image sent according to the rule is processed.
After the image is extracted, in order to better position the dial plate and reduce the interference of other factors (such as light and color), the image is grayed, and the original 4-channel image is used for generating a 1-channel grayscale image, so that the requirement on the performance of the mobile phone can be reduced. And performing Gaussian filtering processing on the gray level image to smooth the gray level image.
Due to the fact that the dial plate has particularity and specific geometric figures, the dial plate can be located through Hough transform image processing, for example, when the dial plate is square, a location matrix can be located, and the range in the location matrix is the range of the dial plate. Or, when the dial is circular, a matrix can be located, the range within the matrix being the range of the dial. Even when a square matrix is positioned when the dial is circular, the space between the circles and squares can be filled with all black or all white.
And (3) utilizing the positioning matrix or the edge of the positioning matrix to cut out the extracted image (the image is not the gray image, and is the image with the color extracted from the video), so that the image with the color only has the area of the dial. The cropped image may be defined as the positioning image.
And then, performing marginalization processing on the positioning image to enable the image to only have lines, and searching straight lines by utilizing Hough line transformation, wherein the number of the searched straight lines is very large, and invalid line segments need to be filtered. The filtering method of the invalid line segment is as follows:
the filtering invalidation adopts a method that the shortest distance from the central point of the dial to the line segment is judged to be less than a specific threshold value (adjusted according to the actual condition), and the length of the line segment is more than or equal to a certain threshold value (determined according to the distance length of the dial pointer), so that the filtering invalidation is considered to be effective. Otherwise, the task bar is invalid.
Of course, in the actual operation process, there may be two hands coinciding or substantially coinciding (the two hands deviate by an angle not exceeding 2 degrees or less), and the mobile phone sends a signal to the watch to allow any one of the two hands of the watch to rotate by a certain angle.
During shooting, most of the time, the mobile phone can be used for shooting watches not just opposite to each other, in order to adapt to the condition that the watches are not always in a correct scanning mode, a reference point, such as a reference point in the 12 o 'clock direction, needs to be found for the pointer, and a color point with color, such as red, can be set in the 12 o' clock direction.
The processor judges the position of a color point (red point) by adopting a color identification mode, and confirms that the red point algorithm is that R minus G is more than or equal to 80 and R minus B is more than or equal to 80 according to the RGB values (0-255) of the image pixels, so that the red point is considered as the red point.
The minute hand and the hour hand are distinguished according to the length and the angle of the line segment, the second hand can be distinguished when the second hand exists, and finally the angle of each hand deviating from 12 o' clock is calculated by combining the central point.
The extracted images are calculated once, and after one calculation is finished, the frame images transmitted subsequently are calculated again, for example, 10 times are calculated, and the angle with the highest occurrence probability in the 10 times is taken as the angle of the pointer deviating from the color point. For example, if 14 degrees, 4 degrees and 16 degrees occur 3 times in 10 times, then 15 degrees is taken as the angle of the pointer from the color point.
Through the technical scheme, firstly, the position of the pointer of the watch on the surface can be accurately calculated in real time, secondly, the requirement on the processor of the mobile phone is not high, asynchronous processing is adopted for identification, the APP of the mobile phone cannot be changed, and moreover, the image frame mode is selectively ignored, so that the low-end mobile phone can express very smoothly even if the image cannot be quickly processed.

Claims (5)

1. A method of determining the position of a surface pointer, the method comprising the steps of:
the method comprises the following steps that firstly, a camera of a shooting device is used for shooting the surface of a watch in real time to obtain a video;
secondly, the shooting device identifies the video shot by the camera, and the identification is to extract the image of the video;
thirdly, the shooting device positions the image to enable the image to be positioned in a dial area; the positioning comprises positioning preprocessing, wherein the positioning preprocessing comprises graying the image to enable the image to generate a 1-channel grayscale image from a 4-channel image; after preprocessing, carrying out Hough transform image processing, positioning the dial in the gray-scale image according to the shape of the dial to obtain a positioning matrix, cutting the image extracted in the second step by using the positioning matrix, removing the area outside the positioning matrix in the image, and reserving the image in the range of the positioning matrix of the image extracted in the second step, namely the positioning image;
step four, the shooting device carries out positioning processing on the pointer in the dial area to obtain a pointer, specifically: performing image marginalization processing on the positioning image to enable the positioning image to only have lines; finding a straight line by adopting Hough transform, and filtering invalid line segments; the method for filtering invalid line segments comprises the following steps:
when only one pointer is provided, the shortest distance H from the central point of the dial to the line segment and the length L of the line segment are judged, and the processor stores a first threshold value and a second threshold value:
if the H is smaller than the first threshold value and the L is larger than the second threshold value, judging the line as a pointer;
when the number of the pointers is two, the shortest distance H from the central point of the dial to the line segment and the length L of the line segment are judged, and the processor stores a first threshold, a second threshold and a second threshold:
if the H is smaller than the first threshold value, and the L is larger than the second first threshold value and smaller than the second threshold value, judging that the line is an hour hand pointer;
if the H is smaller than the first threshold value and the L is larger than the second threshold value, judging that the line is a minute hand pointer;
when the number of the pointers is three, the shortest distance H from the central point of the dial to the line segment and the length L of the line segment are judged, and the processor stores a first threshold, a second threshold and a third threshold:
if the H is smaller than the first threshold value, and the L is larger than the second first threshold value and smaller than the second threshold value, judging that the line is an hour hand pointer;
if the H is smaller than the first threshold value, and the L is larger than the second threshold value and smaller than the second third threshold value, judging that the line is a minute hand pointer;
if the H is smaller than the first threshold value and the L is larger than the second third threshold value, judging that the line is a second hand pointer;
and fifthly, the shooting device determines the angle of the pointer deviating from the preset point.
2. The method of claim 1, wherein the camera is a cell phone comprising a processor and a video camera, the cell phone being a cell phone with an IOS system.
3. The method according to claim 2, wherein in the second step, the extraction is performed according to the processing speed of the processor, and if the current image is not processed, the sent image is identified by skipping the extraction until the first frame of image sent to the processor after the current image is processed and the extraction is completed.
4. The method of claim 1, wherein in step five, a color point is preset in the dial plate, the processor performs color recognition on the positioning image to determine the color point, and calculates an angle between a connecting line of the color point and a center point of the dial plate and the pointer.
5. The method of claim 4, wherein steps two through five are repeated, and a third threshold number of angles from the color point is obtained by processing a third threshold number of subsequent frame images and calculating the angle at which the pointer deviates from the color point, and the angle at which the pointer has the highest probability of occurrence is taken as the angle at which the pointer deviates from the color point.
CN201810251903.5A 2018-03-26 2018-03-26 Method for determining surface pointer position Active CN108549845B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810251903.5A CN108549845B (en) 2018-03-26 2018-03-26 Method for determining surface pointer position
PCT/CN2019/076213 WO2019184642A1 (en) 2018-03-26 2019-02-27 Method and system for determining positions of watch face hands

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN108549845A CN108549845A (en) 2018-09-18
CN108549845B true CN108549845B (en) 2022-04-05

Family

ID=63517018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810251903.5A Active CN108549845B (en) 2018-03-26 2018-03-26 Method for determining surface pointer position

Country Status (1)

Country Link
CN (1) CN108549845B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019184642A1 (en) * 2018-03-26 2019-10-03 广东乐芯智能科技有限公司 Method and system for determining positions of watch face hands
CN111240184B (en) * 2020-02-21 2021-12-31 华为技术有限公司 Method for determining clock error, terminal and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1397914A (en) * 2001-07-18 2003-02-19 佳能株式会社 Image processor and its method method, and camera and its control method
CN102300084A (en) * 2010-06-22 2011-12-28 联发科技股份有限公司 Method for processing input bit stream and signal processing apparatuses thereof
CN105005192A (en) * 2015-07-03 2015-10-28 烟台北极星石英钟有限公司 Pointer-type multifunctional intelligent clock
EP2955596A2 (en) * 2014-06-12 2015-12-16 Withings Analog type watch and time setting method
CN105955011A (en) * 2016-04-21 2016-09-21 深圳欧德蒙科技有限公司 Method and device for intelligently calibrating time
CN106373119A (en) * 2016-09-05 2017-02-01 广东工业大学 Fiber detection method and system
CN107066998A (en) * 2016-12-30 2017-08-18 山东鲁能软件技术有限公司 A kind of pointer-type circular single instrument board real-time identification method of utilization mobile device
JP2018014553A (en) * 2016-07-19 2018-01-25 キヤノン株式会社 Information processing apparatus, information processing method, and program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1397914A (en) * 2001-07-18 2003-02-19 佳能株式会社 Image processor and its method method, and camera and its control method
CN102300084A (en) * 2010-06-22 2011-12-28 联发科技股份有限公司 Method for processing input bit stream and signal processing apparatuses thereof
EP2955596A2 (en) * 2014-06-12 2015-12-16 Withings Analog type watch and time setting method
CN105005192A (en) * 2015-07-03 2015-10-28 烟台北极星石英钟有限公司 Pointer-type multifunctional intelligent clock
CN105955011A (en) * 2016-04-21 2016-09-21 深圳欧德蒙科技有限公司 Method and device for intelligently calibrating time
JP2018014553A (en) * 2016-07-19 2018-01-25 キヤノン株式会社 Information processing apparatus, information processing method, and program
CN106373119A (en) * 2016-09-05 2017-02-01 广东工业大学 Fiber detection method and system
CN107066998A (en) * 2016-12-30 2017-08-18 山东鲁能软件技术有限公司 A kind of pointer-type circular single instrument board real-time identification method of utilization mobile device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Automatic Reading System based on Automatic Alignment Control for Pointer Meter;Qi Li 等;《40th Annual conference of the IEEE industrial electronics society》;20150226;第3414-3418页 *
基于图像处理的水表读数识别;孙经纬 等;《计算机工程与应用》;20151231;第51卷(第S1期);第370-372,382页 *
复杂背景下仪表指针示数的识别与研究;杨传旺;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180315;第2018年卷(第03期);第I138-2396页 *

Also Published As

Publication number Publication date
CN108549845A (en) 2018-09-18

Similar Documents

Publication Publication Date Title
CN106683070B (en) Height measuring method and device based on depth camera
EP3190781B1 (en) Autofocus method, device and electronic apparatus
CN108519734B (en) A kind of system of determining surface pointer position
CN107316326B (en) Edge-based disparity map calculation method and device applied to binocular stereo vision
US9007481B2 (en) Information processing device and method for recognition of target objects within an image
CN108965839B (en) Method and device for automatically adjusting projection picture
CN102184544B (en) Method for correcting deformity and identifying image of go notation
US8428313B2 (en) Object image correction apparatus and method for object identification
CN108305223B (en) Image background blurring processing method and device
WO2022135588A1 (en) Image correction method, apparatus and system, and electronic device
CN109559353B (en) Camera module calibration method and device, electronic equipment and computer readable storage medium
CN110826374B (en) Method and device for monitoring eye gazing time, storage medium and electronic equipment
CN108549845B (en) Method for determining surface pointer position
CN114331860A (en) Distorted image correction method and positioning method thereof
CN110276831A (en) Constructing method and device, equipment, the computer readable storage medium of threedimensional model
CN114494347A (en) Single-camera multi-mode sight tracking method and device and electronic equipment
WO2020014913A1 (en) Method for measuring volume of object, related device, and computer readable storage medium
CN110658918B (en) Positioning method, device and medium for eyeball tracking camera of video glasses
CN111553940A (en) Depth image portrait edge optimization method and processing device
CN109840453B (en) Face matching method and device
CN112396016B (en) Face recognition system based on big data technology
CN113674303A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110505467B (en) Binocular camera module matched with adaptive filter and stereo matching method thereof
CN108682034B (en) Android system-based smart watch entity pointer position determination method
CN108805888B (en) System for determining position of physical pointer on surface of intelligent watch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210618

Address after: 510000 6 jiahuiyuan, Xintang New World garden, Zengcheng District, Guangzhou City, Guangdong Province

Applicant after: Yu Xiyun

Address before: Room 235, No. 333, jiufo Jianshe Road, Zhongxin Guangzhou Knowledge City, Guangzhou, Guangdong 510000

Applicant before: GUANGDONG LEMOVT INTELLIGENT TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220315

Address after: 430000 Shenglong Industrial Park, Yougang village, Mulan street, QianChuan street, Huangpi District, Wuhan City, Hubei Province

Applicant after: WUHAN SUNON ELECTRONIC Co.,Ltd.

Address before: 510000 6 jiahuiyuan, Xintang New World garden, Zengcheng District, Guangzhou City, Guangdong Province

Applicant before: Yu Xiyun

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant