WO2021190640A1 - 指针定位方法、装置及仪表 - Google Patents

指针定位方法、装置及仪表 Download PDF

Info

Publication number
WO2021190640A1
WO2021190640A1 PCT/CN2021/083331 CN2021083331W WO2021190640A1 WO 2021190640 A1 WO2021190640 A1 WO 2021190640A1 CN 2021083331 W CN2021083331 W CN 2021083331W WO 2021190640 A1 WO2021190640 A1 WO 2021190640A1
Authority
WO
WIPO (PCT)
Prior art keywords
pointer
target
value
angle value
dial
Prior art date
Application number
PCT/CN2021/083331
Other languages
English (en)
French (fr)
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 京东方科技集团股份有限公司
Priority to US17/628,162 priority Critical patent/US20240036658A1/en
Publication of WO2021190640A1 publication Critical patent/WO2021190640A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/0304Detection arrangements using opto-electronic means
    • G06F3/0312Detection arrangements using opto-electronic means for tracking the rotation of a spherical or circular member, e.g. optical rotary encoders used in mice or trackballs using a tracking ball or in mouse scroll wheels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04815Interaction with a metaphor-based environment or interaction object displayed as three-dimensional, e.g. changing the user viewpoint with respect to the environment or object
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/20Scenes; Scene-specific elements in augmented reality scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks

Definitions

  • the present disclosure relates to the field of instrument technology, and in particular to a pointer positioning method, device and instrument.
  • meters are widely used in industrial and agricultural production, science and technology, electricity measurement, daily life and other aspects, such as barometers and thermometers in industrial production equipment, as well as voltmeters in scientific experiments. , Ammeter, etc.
  • the positioning method of the pointer in the meter dial of the meter is usually to first collect the dial image of the meter, then identify the circle where the meter dial in the dial image is located, and finally, identify the lines in the circle, such as using Hough transform recognition The line in the circle to get the position of the pointer.
  • the present disclosure provides a pointer positioning method, device and meter.
  • the present disclosure discloses a pointer positioning method, including:
  • the target scale value corresponding to the target pointer is searched from the preset corresponding relationship between the angle value and the scale value.
  • the present disclosure also discloses a pointer positioning device, including:
  • the first detection module is configured to detect the number of first pixels corresponding to the multiple first rotation positions when the virtual pointer rotates according to a first preset angle in the first dial image;
  • the first target position determining module is configured to determine the first target position where the virtual pointer is located according to the number of first pixels corresponding to each of the first rotational positions;
  • the target angle value determining module is configured to determine, according to the first target position, a target angle value between a target pointer and a reference position in the meter dial corresponding to the first dial image;
  • the target scale value searching module is configured to find the target scale value corresponding to the target pointer from the preset corresponding relationship between the angle value and the scale value according to the target angle value.
  • the present disclosure also discloses an instrument including the pointer positioning device described above.
  • the present disclosure also provides a computing processing device, including:
  • a memory in which computer readable codes are stored
  • One or more processors when the computer-readable code is executed by the one or more processors, the computing processing device executes the pointer positioning method described above.
  • the present disclosure also provides a computer program, including computer readable code, which when the computer readable code runs on a computing processing device, causes the computing processing device to execute the pointer positioning method described above.
  • the present disclosure also provides a computer-readable medium in which the above-mentioned computer program is stored.
  • Fig. 1 shows a flowchart of a pointer positioning method according to an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of a meter dial and a virtual pointer of an embodiment of the present disclosure
  • FIG. 3 shows a specific flowchart of a pointer positioning method according to an embodiment of the present disclosure
  • FIG. 4 shows a flowchart of constructing a virtual pointer according to an embodiment of the present disclosure
  • FIG. 5 shows a schematic diagram of a fine scan of a virtual pointer according to an embodiment of the present disclosure
  • FIG. 6 shows a flow chart of generating the corresponding relationship between the preset angle value and the scale value according to an embodiment of the present disclosure
  • Fig. 7 shows a structural block diagram of a pointer positioning device according to an embodiment of the present disclosure
  • FIG. 8 shows a composition structure diagram of a meter according to an embodiment of the present disclosure
  • FIG. 9 schematically shows a block diagram of a computing processing device for executing the method according to the present disclosure.
  • Fig. 10 schematically shows a storage unit for holding or carrying program codes for implementing the method according to the present disclosure.
  • FIG. 1 a flowchart of a pointer positioning method according to an embodiment of the present disclosure is shown, which may specifically include the following steps:
  • Step 101 When the virtual pointer rotates according to a first preset angle in the first dial image, detect the number of first pixels corresponding to the multiple first rotation positions, respectively.
  • the virtual pointer can be constructed in advance, and the pointer length of the constructed virtual pointer is 70% to 90% of the pointer length of the target pointer in the instrument dial, so that the position of the subsequent target pointer can be determined more accurately. The value can be read more accurately.
  • the specific reason is that one end of the target pointer in the instrument dial will coincide with the scale line and value area in the instrument dial. If the pointer length of the constructed virtual pointer is the same as the target in the instrument dial If the pointers of the pointer are of equal length, when the virtual pointer subsequently rotates and scans in the first dial image, the scale lines and value areas in the meter dial will affect the scan result (that is, the number of first pixels or the first number of pixels at each rotation position). In order to ensure that most of the scan results are pixels included in the target pointer, the pointer length of the constructed virtual pointer needs to be set to 70% to 90% of the pointer length of the target pointer in the instrument dial. %.
  • the target pointer is fixed in the instrument dial by the pointer circle center, the two ends of the target pointer are located on both sides of the pointer circle center, one end of the target pointer is used to point to the scale, and the other end of the target pointer is not used to specify the scale.
  • the pointer length of the target pointer in the embodiments of the present disclosure refers to the length from the center of the pointer of the instrument dial to the end of the target pointer pointing to the scale, rather than the total length of the target pointer; correspondingly, the pointer length of the virtual pointer also refers to The length from the center of the pointer of the instrument dial to the end of the scale where the virtual pointer points to the scale.
  • the pointer width of the constructed virtual pointer is smaller than the pointer width of the target pointer in the instrument dial.
  • the target pointer has a larger width, and there may be deviations when determining the position of the target pointer.
  • the pointer width of the pointer is more accurate when locating the position of the target pointer according to the virtual pointer. Therefore, in the embodiment of the present disclosure, the virtual pointer is used to perform rotation scanning to determine the position of the target pointer, which can avoid the deviation in reading the target scale value caused by the positioning deviation of the coarse pointer.
  • the camera when it is necessary to obtain the target scale value corresponding to the target pointer in the meter dial, control the camera to collect the third dial image corresponding to the meter dial, and then obtain the third dial image collected by the camera.
  • the third dial image is a color image
  • the third dial image is binarized to obtain the first dial image.
  • a pre-built virtual pointer is used to perform rotation scanning in the first dial image, and the number of first pixels corresponding to each first rotation position of the virtual pointer in the first dial image is detected.
  • the virtual pointer rotates once at an interval of a first preset angle from the reference position, and each time it rotates by the first preset angle, the position of the virtual pointer in the first dial image is the first rotation position.
  • the target pointer in the instrument dial 20 is 21, the virtual pointer is 22, and 23 is the reference position 0°.
  • the virtual pointer 22 starts from the reference position 23 and moves clockwise. Or counterclockwise, one rotation at the interval of the first preset angle of 1°, and for each rotation of the first preset angle of 1°, the first pixel of the virtual pointer at the first rotation position in the first dial image at this time is detected
  • the number of points Specifically, starting from the reference position, it is rotated by a first preset angle of 1°. At this time, the number of first pixels at the first first rotation position is detected, and then, the angle from the reference position is 1°. Start to rotate another first preset angle of 1°.
  • the number of first pixels at the second first rotation position is detected, and then, the first rotation starts from the position with an angle of 2° from the reference position.
  • the number of first pixels at the third first rotation position is detected at this time, and so on, a total of 360 number of first pixels at the first rotation position can be obtained.
  • the number of the first pixel is associated with the degree of overlap between the virtual pointer and the target pointer.
  • the first number of pixels refers to the number of pixels with a gray value of 255 or a gray value of 0 at the first rotation position.
  • the number of first pixels can be pixels with a gray value of 255 at the first rotation position.
  • the first pixel number can be the gray value at the first rotation position is 0 The number of pixels. In this way, the greater the number of first pixels, the higher the degree of overlap between the virtual pointer and the target pointer.
  • the value of the first preset angle can be set smaller, for example, the first preset angle is set to 0.5°, 0.2°, or 0.1°.
  • the specific orientation of the reference position can be manually designated, and is not limited to the reference position 23 shown in FIG. 2.
  • Step 102 Determine the first target position where the virtual pointer is located according to the number of first pixels corresponding to each of the first rotational positions.
  • the first target position where the virtual pointer is located is determined according to the number of detected first pixels of the virtual pointer at each first rotation position in the first dial image.
  • the number of first pixels at the corresponding first rotation position is greater. Therefore, it can be determined according to the maximum value of the number of first pixels at each first rotation position The first target location.
  • the 185th first rotation position is determined as the first target position.
  • Step 103 Determine, according to the first target position, a target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position.
  • the target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position is determined.
  • step 103 may include the following sub-steps:
  • Sub-step 1031 determining the first number of rotations of the virtual pointer from the reference position to the first target position, and calculating a first product value of the first number of rotations and the first preset angle;
  • Sub-step 1032 determining the first product value as the first angle value
  • Sub-step 1033 Determine the first angle value as the target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position.
  • the first target position and the reference The first angle value between the positions is the first product value of the first number of rotations and the first preset angle, that is, N*M, then the target between the target pointer and the reference position in the instrument dial corresponding to the first dial image
  • the angle value is also N*M.
  • the second case if the first preset angle is greater than the preset threshold, that is, the selected value of the first preset angle is larger, then the number of first pixels at each first rotation position obtained in step 101 is the rough scan result
  • the rotation range of the virtual pointer for re-scanning the virtual pointer according to the first target position.
  • the virtual pointer performs a fine scan within the rotation range, and the second target position is determined according to the result of the fine scan. , Determining the target angle value between the target pointer and the reference position in the meter dial corresponding to the first dial image according to the second target position.
  • the second case has a smaller amount of calculation compared to the first case.
  • Step 104 Find the target scale value corresponding to the target pointer from the preset corresponding relationship between the angle value and the scale value according to the target angle value.
  • the corresponding relationship between the preset angle value and the scale value is established in advance, and the target angle value between the target pointer and the reference position is determined from the preset angle value and the scale value.
  • the target scale value corresponding to the target angle value is searched to obtain the target scale value corresponding to the target pointer.
  • the target scale value can be sent to the designated device in a wireless or wired manner.
  • the scale value monitors the equipment monitored by the meter corresponding to the meter dial.
  • the existing pointer positioning method usually collects the dial image of the instrument first, then recognizes the circle in the dial image, and finally, recognizes the lines in the circle, but the circle in which the instrument dial is located.
  • the lines in the circle and the circle are often inaccurately recognized during the recognition process. There are many reasons. For example, the inaccurate positioning of the center of the circle during the image recognition process and the reflection of light when collecting the dial image will cause the recognition inaccuracy.
  • Accurate; and the embodiment of the present disclosure locates the position of the target pointer according to the number of first pixels at each first rotation position, and does not need to identify the center of the circle where the meter dial is located.
  • the line formed by the reflection in the image of the first dial basically does not completely coincide with the first rotation position corresponding to the virtual pointer, so when the number of first pixels at the first rotation position is counted, the reflection caused by the light is very small , So that the position of the target pointer is located according to the number of first pixels at each first rotation position, and the position of the target pointer can also be accurately identified.
  • the virtual pointer is constructed in advance, and the virtual pointer is used to perform rotation scanning in the first dial image, and the number of first pixels at each first rotation position is compared to detect the position of the target pointer, and Determine the scale value of the target pointer through the correspondence between the preset angle value and the scale value. Since the position of the target pointer is located by the number of first pixels at each first rotation position, the target can be accurately identified The position of the pointer makes the reading of the target pointer more accurate.
  • FIG. 3 a specific flowchart of a pointer positioning method according to an embodiment of the present disclosure is shown, which may specifically include the following steps:
  • Step 301 When the virtual pointer rotates according to a first preset angle in the first dial image, detect the number of first pixels corresponding to the multiple first rotation positions.
  • a virtual pointer is constructed in advance, and the pre-built virtual pointer is used to perform rotation scanning in the first dial image, and the first pixel point of the virtual pointer at each first rotation position in the first dial image is detected
  • the virtual pointer starts from the reference position and rotates one circle at the interval of 1° at the first preset angle.
  • the first preset angle is rotated by 1°, it is detected that the virtual pointer is in the first position at this time.
  • the number of first pixels at the first rotation position in the dial image therefore, the number of first pixels at 360 first rotation positions can be obtained.
  • step 301 it further includes steps 401 to 407:
  • Step 401 Obtain a second dial image collected by the camera
  • Step 402 Control the touch screen to display the second dial image
  • Step 403 In the case of receiving the circle center coordinates input by the user on the touch screen, control the touch screen to display the position of the circle center coordinates in a preset circular pattern;
  • Step 404 In the case of receiving the user's first determining operation of the center coordinates, determine the position where the center coordinates are located as the pointer center of the virtual pointer;
  • Step 405 In the case of receiving the pointer length input by the user on the touch screen, control the touch screen to display the pointer length in a preset linear pattern; one end of the linear pattern and the pointer The center of the circle coincides;
  • Step 406 In the case of receiving a second determination operation of the pointer length by the user, determine the pointer length as the pointer length of the virtual pointer;
  • Step 407 Construct the virtual pointer according to the pointer center of the virtual pointer and the pointer length of the virtual pointer.
  • the camera in order to construct a virtual pointer, first, it is necessary to control the camera to collect the second dial image corresponding to the instrument dial, and obtain the second dial image collected by the camera.
  • the second dial image is a color image; After the second dial image is binarized, the subsequent touch screen displays the second dial image after the binarization process.
  • the user can input the center coordinates in the center coordinate input box on the touch screen, then the touch screen Receive the center coordinates entered by the user on the touch screen, and then control the touch screen to display the position of the center coordinates in the second dial image in a preset circular pattern, for example, display the center coordinates in a green circular pattern Location, and display a confirm option and a cancel option on the touch screen.
  • the processor in the instrument controls the touch screen to redisplay the input box of the center of the circle, so that the user can input the center of the circle again.
  • the touch screen can be controlled to display the pointer length input box.
  • the user can enter the pointer length in the pointer length input box on the touch screen, and the touch screen receives the user’s touch The pointer length entered on the screen, and then control the touch screen to display the pointer length in the second dial image with a preset linear pattern, and one end of the preset linear pattern coincides with the center of the pointer.
  • the touch A confirmation option and a cancellation option are displayed on the screen.
  • the processor in the meter determines the input pointer length as the pointer length of the virtual pointer; when the user observes that the length of the preset linear pattern is not between 70% and 90% of the pointer length of the target pointer, the user can touch If the cancel option is canceled, the touch screen receives the second cancel operation of the pointer length from the user, and the processor in the meter controls the touch screen to redisplay the pointer length input box for the user to input the pointer length again.
  • a virtual pointer is constructed according to the determined pointer center of the virtual pointer and the pointer length of the virtual pointer.
  • the user manually inputs the coordinates of the center of the circle and the length of the pointer to construct a virtual pointer, which reduces the amount of calculation of the processor in the instrument, reduces the difficulty of the algorithm, and improves the stability of the processor.
  • Step 302 Determine the first target position where the virtual pointer is located according to the number of first pixels corresponding to each of the first rotational positions.
  • the first target position where the virtual pointer is located is determined according to the number of detected first pixels of the virtual pointer at each first rotation position in the first dial image.
  • step 302 may include sub-step S11, sub-step S12, and sub-step S13:
  • Sub-step S11 when the first maximum value among the number of first pixel points corresponding to each of the first rotation positions is one, the first rotation position corresponding to the first maximum value is determined as the first target Location;
  • Sub-step S12 when there are multiple first maximum values in the number of first pixel points corresponding to each of the first rotational positions, determine the center positions of the first rotational positions corresponding to the multiple first maximum values;
  • the center position of the first rotation position corresponding to the plurality of first maximum values is determined as the first target position.
  • the first maximum value among the number of first pixels at each first rotation position may be one or more.
  • the first rotation position corresponding to the first maximum value is determined as the first target position;
  • the center positions of the first rotational positions corresponding to the multiple first maximum values determine the center positions of the first rotational positions corresponding to the multiple first maximum values Is the first target location.
  • the first rotation positions corresponding to the multiple first maximum values need to be continuous.
  • the number of first pixels at the first rotational position 1, the first rotational position 2, and the first rotational position 3 are all the first maximum
  • the first preset angle is 1°
  • the first rotational position 1 is the reference position
  • the angle between is 184°
  • the angle between the first rotation position 2 and the reference position is 185°
  • the angle between the first rotation position 3 and the reference position is 186°.
  • the average value of the three angles is calculated to obtain
  • the average angle is 185°, that is, the center positions of the first rotational position 1, the first rotational position 2, and the first rotational position 3 are the first rotational position 2, and the first rotational position 2 is determined as the first target position.
  • Step 303 Determine the rotation range of the virtual pointer in the first dial image according to the first target position.
  • the selected value of the first preset angle is relatively large, that is, the number of first pixels at each first rotation position obtained in step 301 is the result of the rough scan.
  • the rotation range for the virtual pointer it is also necessary to determine the rotation range for the virtual pointer to perform rotation scanning in the first dial image again according to the first target position.
  • step 303 may include sub-step S21, sub-step S22, sub-step S23, and sub-step S24:
  • Sub-step S21 determining a first angle value between the first target position and the reference position
  • Sub-step S22 determining the sum of the first angle value and the first preset value as the maximum value of the rotation range of the virtual pointer in the first dial image
  • Sub-step S23 determining the difference between the first angle value and the second preset value as the minimum value of the rotation range of the virtual pointer in the first dial image
  • Sub-step S24 determining the rotation range of the virtual pointer in the first dial image according to the maximum value of the rotation range and the minimum value of the rotation range.
  • the first angle value between the first target position and the reference position is determined. Assuming that the virtual pointer has rotated N first preset angles from the reference position to reach the first target position, and the first preset angle is M, the first angle value between the first target position and the reference position is N*M .
  • the first preset value is added to the first angle value, and the sum of the first angle value and the first preset value is determined as the maximum value of the rotation range of the virtual pointer in the first dial image;
  • the second preset value is subtracted from the first angle value, and the difference between the first angle value and the second preset value is determined as the minimum value of the rotation range of the virtual pointer in the first dial image.
  • the first preset value and the second preset value can be artificially set based on experience.
  • the rotation range of the virtual pointer in the first dial image is determined.
  • the first preset angle M is 1° and N is 185, that is, the virtual pointer rotates 185 first preset angles from the reference position before reaching the first target position, then the first target position between the first target position and the reference position
  • An angle value is 185°, assuming that the first preset value and the second preset value are both 3°, the maximum value of the rotation range of the virtual pointer in the first dial image is 188°, and the virtual pointer is on the first dial image
  • the minimum value of the rotation range in is 182°.
  • Step 304 When the virtual pointer rotates according to a second preset angle within the rotation range, detect the number of second pixels corresponding to the multiple second rotation positions.
  • the virtual pointer performs a rotation scan again within the rotation range of the first dial image to detect the number of second pixels at each second rotation position of the virtual pointer in the rotation range, and each second The number of second pixels at the rotated position is the result of the fine scan.
  • the virtual pointer starts from the minimum value of the rotation range to the maximum value of the rotation range, and rotates at intervals of a second preset angle. Each time the second preset angle is rotated, the position of the virtual pointer in the first dial image is the first 2. Rotation position.
  • the target pointer 21 is located within the rotation range determined according to the first target position.
  • the second preset angle is set to 0.1°. Starting from the minimum value to the maximum value of the rotation range, rotate at a second preset angle of 0.1°, and every time you rotate a second preset angle of 0.1°, detect that the virtual pointer is at the second rotation position in the first dial image at this time.
  • the position of the scan that is, the position corresponding to the maximum value of the rotation range.
  • the rotation range starts from the position of the minimum value of the rotation range 182° to a second preset angle of 0.1° At this time, the number of second pixels at the first second rotation position is detected. Then, the second preset angle of 0.1° is rotated from the position where the angle between the reference position is 182.1°, and the second preset angle is detected at this time.
  • the number of second pixels at the two second rotation positions, and then, starting from the position where the angle between the reference position is 182.2° and a second preset angle, the third second rotation position is detected at this time The number of second pixels, and so on, can reach the number of second pixels at 60 second rotation positions in total.
  • the second number of pixels refers to the number of pixels with a gray value of 255 or a gray value of 0 at the second rotation position.
  • the specific statistics are the number of pixels with a gray value of 255 or a gray value of 0, which is determined according to the background color of the meter dial in the first dial image and the color of the target pointer.
  • the rotation direction of the virtual pointer 22 is shown by the arrow in FIG. 5, that is, the virtual pointer 22 starts from the minimum value of the rotation range to the maximum value of the rotation range; of course, the rotation direction of the virtual pointer 22 can also be Start from the maximum value of the rotation range to the minimum value of the rotation range.
  • Step 305 Determine the second target position where the virtual pointer is located according to the number of second pixels at each of the second rotational positions.
  • the second target position is determined according to the detected second pixel number of the virtual pointer at each second rotation position within the rotation range.
  • step 305 may include sub-step S31, sub-step S32, and sub-step S33:
  • Sub-step S31 when the second maximum value among the number of second pixel points corresponding to each of the second rotation positions is one, the second rotation position corresponding to the second maximum value is determined as the second target Location;
  • Sub-step S32 when there are multiple second maximum values among the number of second pixel points corresponding to each of the second rotational positions, determine the center positions of the second rotational positions corresponding to the multiple second maximum values;
  • sub-step S33 the center position of the second rotation position corresponding to the plurality of second maximum values is determined as the second target position.
  • the second maximum value among the number of second pixel points at each second rotation position may be one or more.
  • the second rotation position corresponding to the second maximum value is determined as the second target position; when the second maximum value is When there are multiple second maximum values in the number of second pixel points, determine the center positions of the second rotational positions corresponding to the multiple second maximum values, and determine the center positions of the second rotational positions corresponding to the multiple second maximum values Is the second target location.
  • the maximum value of the rotation range is 188°
  • the minimum value of the rotation range is 182°
  • the second preset angle is 0.1°
  • the second rotation position 1, the second rotation position 2, and the second rotation are detected within the rotation range
  • the number of second pixels at position 3 is the second maximum
  • the angle between the second rotation position 1 and the reference position is 185°
  • the angle between the second rotation position 2 and the reference position is 185.1°
  • the second The angle between the rotation position 3 and the reference position is 185.2°.
  • Calculate the average of these three angles, and the average angle is 185.1°, which is the center of the second rotation position 1, the second rotation position 2 and the second rotation position 3.
  • the position is the second rotational position 2, and the second rotational position 2 is determined as the second target position.
  • Step 306 Determine, according to the second target position, a target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position.
  • the target angle value between the target pointer and the reference position in the instrument dial corresponding to the first dial image is determined, and the second target position is the corresponding value of the first dial image.
  • the position of the target pointer in the instrument dial is determined, and the second target position is the corresponding value of the first dial image.
  • step 306 may include sub-step S41 and sub-step S42:
  • Sub-step S41 determining a second angle value between the second target position and the reference position
  • Sub-step S42 determining the second angle value as the target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position.
  • sub-step S41 may include sub-step S411 and sub-step S412:
  • Sub-step S411 determining a second number of rotations of the virtual pointer from the minimum value of the rotation range to the second target position, and calculating a second product of the second number of rotations and the second preset angle value;
  • the virtual pointer in the first dial image is L
  • the virtual pointer has rotated X second preset angles from the minimum value of the rotation range before reaching the second target position, that is, the second rotation
  • the number of times is X
  • the second preset angle is Y
  • the second product value is X*Y.
  • the second angle value between the second target position and the reference position is the sum of the minimum value of the rotation range and the second product value The value is L+X*Y.
  • the second angle value between the second target position and the reference position is determined as the target angle value between the target pointer and the reference position on the meter dial corresponding to the first dial image.
  • the target angle value between the target pointer and the reference position is 185.1°.
  • Step 307 Find the target scale value corresponding to the target pointer from the preset corresponding relationship between the angle value and the scale value according to the target angle value.
  • the corresponding relationship between the preset angle value and the scale value is established in advance, and the target angle value between the target pointer and the reference position is determined from the preset angle value and the scale value.
  • the target scale value corresponding to the target angle value is searched to obtain the target scale value corresponding to the target pointer.
  • step 307 it further includes step 601 to step 605:
  • Step 601 When a third angle value between the virtual pointer and the reference position input by the user on the touch screen is received, control the touch screen to display that the virtual pointer is at the second The first position in the dial image;
  • Step 602 In the case of receiving a third determination operation of the third angle value by the user, determine the third angle value as the start-of-scale angle value;
  • Step 603 When receiving a fourth angle value between the virtual pointer and the reference position input by the user on the touch screen, control the touch screen to display that the virtual pointer is at the second The second position in the dial image;
  • Step 604 In the case of receiving a user's fourth determining operation on the fourth angle value, determine the fourth angle value as the end-of-range angle value;
  • Step 605 according to the range value input by the user on the touch screen, the start-of-range angle value, and the end-of-range angle value, determine the correspondence between a preset angle value and a scale value;
  • the value includes the minimum measurement value and the maximum measurement value.
  • the touch screen in order to determine the corresponding relationship between the preset angle value and the scale value, first, it is necessary to control the touch screen to display the second dial image corresponding to the meter dial, and control the touch screen to display the start-of-scale angle Value input box, the user can enter the third angle value in the input box of the start-of-scale angle value on the touch screen, and the touch screen receives the difference between the virtual pointer input by the user on the touch screen and the reference position The third angle value, and then control the touch screen to display the first position of the virtual pointer in the second dial image. At this time, the angle between the first position and the reference position is the third angle value, and the touch screen An OK option and a cancel option are displayed on the screen.
  • the processor in the meter determines the third angle value as the start-of-scale angle value; when the user observes the first position of the virtual pointer in the second dial image, the scale corresponding to the smallest measured value in the range value
  • the processor in the instrument controls the touch screen to redisplay the input box of the start-of-scale angle value. For the user to input the third angle value again.
  • the user can input the fourth angle value in the input box of the end angle value of the range on the touch screen, and the touch screen receives the user’s input on the touch screen.
  • the touch screen receives the user’s input on the touch screen.
  • Enter the fourth angle value between the virtual pointer and the reference position and then control the touch screen to display the second position of the virtual pointer in the second dial image.
  • the angle between the second position and the reference position is the first Four angle values, and a confirmation option and a cancellation option are displayed on the touch screen.
  • the processor in the meter determines the fourth angle value as the end-of-range angle value; when the user observes the second position of the virtual pointer in the second dial image, the scale corresponding to the largest measurement value in the range value is not When overlapped, the user can touch the cancel option, and the touch screen receives the user's fourth cancel operation on the fourth angle value, and the processor in the meter controls the touch screen to redisplay the input box of the range end angle value for the user Enter the fourth angle value again.
  • the touch screen determines the corresponding relationship between the preset angle value and the scale value according to the range value input by the user on the touch screen, the determined start-of-range angle value and the end-of-range angle value.
  • the scale corresponding to each measurement value in the range value is evenly distributed in the meter dial, there is a linear relationship between the angle value and the scale value corresponding to the scale, as shown in Figure 2, the smallest measurement in the known range value After the value is 0, the maximum measurement value is 1.6, and the range start angle value and range end angle value, the angle value and scale can be determined directly according to the minimum measurement value, maximum measurement value, range start angle value and range end angle value Correspondence between values.
  • the pointer length of the virtual pointer used can be consistent with the pointer length of the target pointer, so that the user can observe whether the virtual pointer is with the minimum measurement value.
  • the corresponding scale and the scale corresponding to the maximum measurement value coincide; and when the target scale value pointed by the target pointer is actually detected, the pointer length of the virtual pointer needs to be set to 70% to 90% of the pointer length of the target pointer.
  • the user manually enters the minimum measurement value, maximum measurement value, start-of-range angle value, and end-of-range angle value to generate the corresponding relationship between the angle value and the scale value, which reduces the calculation amount of the processor in the instrument and reduces the algorithm Difficulty, improve the stability of processor operation.
  • the second dial image in the embodiment of the present disclosure refers to the dial image collected by the camera when the virtual pointer is constructed and the corresponding relationship between the angle value and the scale value is generated
  • the first dial image refers to When measuring the scale value of the target pointer, the dial image collected by the camera.
  • the virtual pointer is constructed in advance, and the virtual pointer is used to perform a rough scan in the first dial image to obtain the number of first pixels at each first rotation position to determine the first target position.
  • a target position determines the rotation range of the virtual pointer during a fine scan in the first dial image, and the virtual pointer is used to perform a fine scan within the rotation range to obtain the number of second pixels at each second rotation position within the rotation range.
  • the second target position is determined, and then the target angle value between the target pointer and the reference position is further determined, and finally the scale value of the target pointer is determined through the correspondence between the preset angle value and the scale value.
  • the position of the target pointer is located by the number of first pixels at each first rotation position and the number of second pixels at each second rotation position, the position of the target pointer can be accurately identified, so that the target pointer’s The reading is more accurate; and, through the coarse scan first and then the fine scan, the processor's calculation amount can be effectively reduced.
  • FIG. 7 a structural block diagram of a pointer positioning device according to an embodiment of the present disclosure is shown.
  • the pointer positioning device 700 includes:
  • the first detection module 701 is configured to detect the number of first pixels corresponding to the multiple first rotation positions when the virtual pointer rotates according to a first preset angle in the first dial image;
  • the first target position determining module 702 is configured to determine the first target position where the virtual pointer is located according to the number of first pixels corresponding to each of the first rotational positions;
  • the target angle value determining module 703 is configured to determine, according to the first target position, a target angle value between a target pointer and a reference position in the meter dial corresponding to the first dial image;
  • the target scale value searching module 704 is configured to find the target scale value corresponding to the target pointer from the preset corresponding relationship between the angle value and the scale value according to the target angle value.
  • the target angle value determining module 703 includes:
  • a rotation range determining sub-module configured to determine the rotation range of the virtual pointer in the first dial image according to the first target position
  • the detection sub-module is configured to detect the number of second pixels corresponding to the multiple second rotation positions when the virtual pointer rotates according to a second preset angle within the rotation range;
  • the second target position determining sub-module is configured to determine the second target position where the virtual pointer is located according to the number of second pixels corresponding to each of the second rotational positions;
  • the target angle value determining sub-module is configured to determine the target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position according to the second target position.
  • the first target position determining module 702 includes:
  • the target position first determining sub-module is configured to, when the first maximum value among the number of first pixel points at each of the first rotational positions is one, calculate the first rotational position corresponding to the first maximum value Determined as the first target location;
  • the center position determining sub-module is configured to determine the center of the first rotation position corresponding to the multiple first maximum values when the first maximum value in the number of first pixel points at each of the first rotation positions is multiple Location;
  • the second target position determining sub-module is configured to determine the center position of the first rotational position corresponding to the plurality of first maximum values as the first target position.
  • the rotation range determining sub-module includes:
  • a first angle value determining unit configured to determine a first angle value between the first target position and the reference position
  • the maximum value determining unit is configured to determine the sum of the first angle value and the first preset value as the maximum value of the rotation range of the virtual pointer in the first dial image;
  • the minimum value determining unit is configured to determine the difference between the first angle value and the second preset value as the minimum value of the rotation range of the virtual pointer in the first dial image;
  • the rotation range determining unit is configured to determine the rotation range of the virtual pointer in the first dial image according to the maximum value of the rotation range and the minimum value of the rotation range.
  • the second target position determining submodule includes:
  • the target position first determining unit is configured to determine the second rotation position corresponding to the second maximum value when the second maximum value among the number of second pixel points at each of the second rotation positions is one Is the second target position;
  • the center position determining unit is configured to determine the center position of the second rotation position corresponding to the plurality of second maximum values when the second maximum value in the number of second pixel points at each of the second rotation positions is multiple ;
  • the second target position determining unit is configured to determine the center position of the second rotational position corresponding to the plurality of second maximum values as the second target position.
  • the target angle value determining sub-module includes:
  • a second angle value determining unit configured to determine a second angle value between the second target position and the reference position
  • the target angle value determining unit is configured to determine the second angle value as a target angle value between the target pointer on the meter dial corresponding to the first dial image and the reference position.
  • the pointer positioning device 700 further includes:
  • the second dial image acquisition module is configured to acquire the second dial image collected by the camera
  • the second dial image display module is configured to control the touch screen to display the second dial image
  • a circle center coordinate display module configured to control the touch screen to display the position of the circle center coordinates in a preset circular pattern when receiving the circle center coordinates input by the user on the touch screen;
  • the pointer center determination module is configured to determine the position where the center coordinates are located as the pointer center of the virtual pointer when the user's first determination operation on the center coordinates is received;
  • the pointer length display module is configured to, upon receiving the pointer length input by the user on the touch screen, control the touch screen to display the pointer length in a preset linear pattern; One end coincides with the center of the pointer;
  • a pointer length determining module configured to determine the pointer length as the pointer length of the virtual pointer in the case of receiving a second determination operation of the pointer length by the user;
  • the virtual pointer construction module is configured to construct the virtual pointer according to the pointer center of the virtual pointer and the pointer length of the virtual pointer.
  • the pointer positioning device 700 further includes:
  • the first position display module is configured to control the touch screen to display the virtual The pointer is at the first position in the second dial image
  • the start-of-scale angle value determination module is configured to determine the third angle value as the start-of-scale angle value in the case of receiving a third determination operation of the third angle value by the user;
  • the second position display module is configured to, when receiving a fourth angle value between the virtual pointer and the reference position input by the user on the touch screen, control the touch screen to display the virtual The pointer is at the second position in the second dial image;
  • the measuring range end angle value determining module is configured to determine the fourth angle value as the measuring range end angle value in the case of receiving a user's fourth determining operation on the fourth angle value;
  • the corresponding relationship determination module is configured to determine the correspondence between the preset angle value and the scale value according to the range value, the start-of-range angle value, and the end-of-range angle value input by the user on the touch screen Relationship; the range value includes the minimum measurement value and the maximum measurement value.
  • the pointer length of the virtual pointer is 70% to 90% of the pointer length of the target pointer.
  • the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
  • the virtual pointer is constructed in advance, and the virtual pointer is used to perform rotation scanning in the first dial image, and the number of first pixels at each first rotation position is compared to detect the position of the target pointer, and Determine the scale value of the target pointer through the correspondence between the preset angle value and the scale value. Since the position of the target pointer is located by the number of first pixels at each first rotation position, the target can be accurately identified The position of the pointer makes the reading of the target pointer more accurate.
  • composition structure diagram of a meter according to an embodiment of the present disclosure.
  • the embodiment of the present disclosure also provides a meter 800, which includes the pointer positioning device 700 described above.
  • the meter 800 further includes a meter body 801, a camera 802, and a touch screen 803.
  • the meter body 801 includes a meter dial 20 and a target pointer 21.
  • the camera 802 is configured to capture the first dial image (actually the third dial image is captured, but after the capture, the third dial image needs to be binarized to obtain the first dial image) and the second dial Image;
  • the touch screen 803 is configured to receive the center coordinates, pointer length, third angle value, fourth angle value, and range value input by the user, and to display the second dial image.
  • the touch screen 803 can also receive the user's first confirm operation, first cancel operation, second confirm operation, second cancel operation, third confirm operation, third cancel operation, fourth confirm operation, and fourth cancel operation. .
  • the pointer positioning device 700 may be a processor in the meter 800, and the pointer positioning function is implemented by the processor in the meter 800.
  • the virtual pointer is constructed in advance, and the virtual pointer is used to perform rotation scanning in the first dial image, and the number of first pixels at each first rotation position is compared to detect the position of the target pointer, and Determine the scale value of the target pointer through the correspondence between the preset angle value and the scale value. Since the position of the target pointer is located by the number of first pixels at each first rotation position, the target can be accurately identified The position of the pointer makes the reading of the target pointer more accurate.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units.
  • Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
  • the various component embodiments of the present disclosure may be implemented by hardware, or by software modules running on one or more processors, or by a combination of them.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the computing processing device according to the embodiments of the present disclosure.
  • DSP digital signal processor
  • the present disclosure can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein.
  • Such a program for realizing the present disclosure may be stored on a computer-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
  • FIG. 9 shows a computing processing device that can implement the method according to the present disclosure.
  • the computing processing device traditionally includes a processor 1010 and a computer program product in the form of a memory 1020 or a computer readable medium.
  • the memory 1020 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the memory 1020 has a storage space 1030 for executing program codes 1031 of any method steps in the above methods.
  • the storage space 1030 for program codes may include various program codes 1031 respectively used to implement various steps in the above method. These program codes can be read from or written into one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks.
  • Such a computer program product is usually a portable or fixed storage unit as described with reference to FIG. 10.
  • the storage unit may have storage segments, storage spaces, etc. arranged similarly to the memory 1020 in the computing processing device of FIG. 9.
  • the program code can be compressed in an appropriate form, for example.
  • the storage unit includes computer-readable codes 1031', that is, codes that can be read by, for example, a processor such as 1010. These codes, when run by a computing processing device, cause the computing processing device to execute the method described above. The various steps.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

指针定位方法、装置及仪表,涉及仪表技术领域。在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量,根据各个第一旋转位置对应的第一像素点数量,确定虚拟指针所在的第一目标位置,根据第一目标位置,确定仪表表盘中的目标指针与基准位置之间的目标角度值,根据目标角度值,从预设的角度值与刻度值之间的对应关系中,查找目标指针对应的目标刻度值。

Description

指针定位方法、装置及仪表
相关申请的交叉引用
本公开要求在2020年03月27日提交中国专利局、申请号为202010232222.1、名称为“一种指针定位方法、装置及仪表”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及仪表技术领域,特别是涉及一种指针定位方法、装置及仪表。
背景技术
仪表作为一种常见的计量工具,被广泛地应用于工农业生产、科学技术、电力计量、日常生活等各个方面,如工业生产设备中的气压表、温度表等,以及科学实验中的电压表、电流表等。
目前,仪表的仪表表盘中的指针的定位方法,通常是先采集仪表的表盘图像,然后识别表盘图像中的仪表表盘所在的圆形,最后,识别圆形中的线条,如采用霍夫变换识别圆形中的线条,以得到指针的位置。
概述
本公开提供一种指针定位方法、装置及仪表。
本公开公开了一种指针定位方法,包括:
在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量;
根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置;
根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值;
根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值。
本公开还公开了一种指针定位装置,包括:
第一检测模块,被配置为在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量;
第一目标位置确定模块,被配置为根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置;
目标角度值确定模块,被配置为根据所述第一目标位置,确定所述第一 表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值;
目标刻度值查找模块,被配置为根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值。
本公开还公开了一种仪表,包括上述的指针定位装置。
本公开还提供一种计算处理设备,包括:
存储器,其中存储有计算机可读代码;以及
一个或多个处理器,当所述计算机可读代码被所述一个或多个处理器执行时,所述计算处理设备执行上述的指针定位方法。
本公开还提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算处理设备上运行时,导致所述计算处理设备执行上述的指针定位方法。
本公开还提供一种计算机可读介质,其中存储了上述的计算机程序。
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。
附图说明
图1示出了本公开实施例的一种指针定位方法的流程图;
图2示出了本公开实施例的仪表表盘和虚拟指针的示意图;
图3示出了本公开实施例的一种指针定位方法的具体流程图;
图4示出了本公开实施例的虚拟指针的构建流程图;
图5示出了本公开实施例的虚拟指针细扫描的示意图;
图6示出了本公开实施例的预设的角度值与刻度值之间的对应关系的生成流程图;
图7示出了本公开实施例的一种指针定位装置的结构框图;
图8示出了本公开实施例的一种仪表的组成结构图;
图9示意性地示出了用于执行根据本公开的方法的计算处理设备的框图;并且
图10示意性地示出了用于保持或者携带实现根据本公开的方法的程序代码的存储单元。
具体实施例
为使本公开的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本公开作进一步详细的说明。显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属 于本公开保护的范围。
参照图1,示出了本公开实施例的一种指针定位方法的流程图,具体可以包括如下步骤:
步骤101,在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量。
在本公开实施例中,可以预先构建虚拟指针,构建的虚拟指针的指针长度为仪表表盘中的目标指针的指针长度的70%至90%,使得后续目标指针的位置确定的更准确,目标刻度值的读取可更精确,其具体的原因在于:仪表表盘中的目标指针的一端会与仪表表盘中的刻度线和数值区域等重合,如果构建的虚拟指针的指针长度与仪表表盘中的目标指针的指针长度相等,则虚拟指针后续在第一表盘图像中进行旋转扫描时,仪表表盘中的刻度线和数值区域等会对扫描结果(即每个旋转位置处的第一像素点数量或第二像素点数量)造成影响,为了保证扫描结果中的绝大部分为目标指针包括的像素点,需要将构建的虚拟指针的指针长度设置为仪表表盘中的目标指针的指针长度的70%至90%。
由于在实际产品中,目标指针通过指针圆心固定在仪表表盘中,目标指针的两端分别位于指针圆心的两侧,目标指针的一端用于指向刻度,目标指针的另一端不是用来指定刻度的,本公开实施例中的目标指针的指针长度指的是仪表表盘的指针圆心到目标指针指向刻度的一端的长度,而不是目标指针的总长度;相应的,虚拟指针的指针长度也指的是仪表表盘的指针圆心到虚拟指针指向刻度的一端的长度。
而构建的虚拟指针的指针宽度小于仪表表盘中的目标指针的指针宽度,通常情况下,目标指针的宽度较大,在确定目标指针的位置时容易存在偏差,将虚拟指针的宽度设置成小于目标指针的指针宽度,在根据虚拟指针定位目标指针的位置时,定位更加准确。因此,本公开实施例通过虚拟指针进行旋转扫描,以确定目标指针的位置,可以避免粗指针定位偏差带来的目标刻度值的读取偏差。
在实际应用中,当需要获取仪表表盘中的目标指针对应的目标刻度值时,控制摄像头采集仪表表盘对应的第三表盘图像,然后获取摄像头采集的第三表盘图像,第三表盘图像为彩色图像,接着,对第三表盘图像进行二值化处理,得到第一表盘图像。
采用预先构建的虚拟指针在第一表盘图像中进行旋转扫描,检测虚拟指针在第一表盘图像中的每个第一旋转位置对应的第一像素点数量。其中,虚拟指针从基准位置开始以第一预设角度为间隔旋转一周,每旋转第一预设角度,虚拟指针在第一表盘图像中的位置为第一旋转位置。
如图2所示,仪表表盘20中的目标指针为21,虚拟指针为22,23为基 准位置0°,假设第一预设角度为1°,虚拟指针22从基准位置23开始,沿顺时针或者逆时针方向,以第一预设角度1°为间隔旋转一周,每旋转一个第一预设角度1°,检测虚拟指针此时在第一表盘图像中的第一旋转位置处的第一像素点数量。具体的,从基准位置开始旋转一个第一预设角度1°,此时检测第一个第一旋转位置处的第一像素点数量,接着,从与基准位置之间的角度为1°的位置开始再旋转一个第一预设角度1°,此时检测第二个第一旋转位置处的第一像素点数量,然后,从与基准位置之间的角度为2°的位置开始再旋转一个第一预设角度1°,此时检测第三个第一旋转位置处的第一像素点数量,以此类推,可总共得到360个第一旋转位置处的第一像素点数量。
其中,第一像素点数量与虚拟指针和目标指针的重合程度关联。第一像素点数量指的是第一旋转位置处的灰度值为255或灰度值为0的像素点的数量。当第一表盘图像中的仪表表盘的背景为黑色,而第一表盘图像中的目标指针的颜色为白色时,第一像素点数量可以为第一旋转位置处的灰度值为255的像素点的数量;当第一表盘图像中的仪表表盘的背景为白色,而第一表盘图像中的目标指针的颜色为黑色时,第一像素点数量可以为第一旋转位置处的灰度值为0的像素点的数量。这样,第一像素点数量越大,虚拟指针与目标指针的重合程度越高。
当然,为了后续更精确地定位目标指针的位置,可将第一预设角度的值设置的更小,如第一预设角度设置成0.5°、0.2°或0.1°等。基准位置的具体方位可人为指定,不局限于图2所示的基准位置23。
步骤102,根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置。
在本公开实施例中,根据检测到的虚拟指针在第一表盘图像中的各个第一旋转位置处的第一像素点数量,确定虚拟指针所在的第一目标位置。
当虚拟指针与目标指针的重合度越高时,对应的第一旋转位置处的第一像素点数量越多,因此,可根据各个第一旋转位置处的第一像素点数量中的最大值确定第一目标位置。
例如,检测到的是虚拟指针在第一表盘图像中的360个第一旋转位置处的第一像素点数量,对比360个第一旋转位置处的第一像素点数量,寻找其中的最大值,假设第185个第一旋转位置处的第一像素点数量最大,则将第185个第一旋转位置确定为第一目标位置。
步骤103,根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值。
在本公开实施例中,根据确定的第一目标位置,确定第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值。
第一种情况,若第一预设角度小于预设阈值,即第一预设角度选取的数 值较小,则步骤101得到的每个第一旋转位置处的第一像素点数量为细扫描结果,可直接将第一目标位置确定为目标指针的位置。具体地,步骤103可以包括如下子步骤:
子步骤1031,确定所述虚拟指针从所述基准位置旋转至所述第一目标位置的第一旋转次数,计算所述第一旋转次数与所述第一预设角度的第一乘积值;
子步骤1032,将所述第一乘积值确定为所述第一角度值;
子步骤1033,将所述第一角度值确定为所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
示例地,假设虚拟指针从基准位置开始旋转了N个第一预设角度才到达第一目标位置,即第一旋转次数为N,且第一预设角度为M,则第一目标位置与基准位置之间的第一角度值为第一旋转次数与第一预设角度的第一乘积值,即N*M,则第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值也为N*M。
第二种情况,若第一预设角度大于预设阈值,即第一预设角度选取的数值较大,则步骤101得到的每个第一旋转位置处的第一像素点数量为粗扫描结果,为了提高目标指针的定位精度,还需要根据第一目标位置,确定虚拟指针再次进行旋转扫描的旋转范围,虚拟指针在该旋转范围内进行细扫描,根据细扫描结果确定第二目标位置,最后,根据第二目标位置确定第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值。具体过程可参照下面步骤303至步骤306中的描述,在此仅简述其具体的过程,并且,第二种情况相对于第一种情况来说,运算量较小。
步骤104,根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值。
在本公开实施例中,预先建立预设的角度值与刻度值之间的对应关系,在确定了目标指针与基准位置之间的目标角度值,从预设的角度值与刻度值之间的对应关系中,查找目标角度值对应的目标刻度值,即得到目标指针对应的目标刻度值。
如图2所示,假设目标角度值为185°,从预设的角度值与刻度值之间的对应关系中,查找目标角度值185°对应的目标刻度值为0.3Mpa,则目标指针对应的目标刻度值为0.3Mpa。
在实际应用中,在得到目标指针对应的目标刻度值之后,可通过无线或有线的方式将目标刻度值发送至指定设备中,管理人员可在指定设备中查看该目标刻度值,以根据该目标刻度值监控仪表表盘对应的仪表所监测的设备。
需要说明的是,现有的指针定位方式,通常是先采集仪表的表盘图像,然后识别表盘图像中的仪表表盘所在的圆形,最后,识别圆形中的线条,但 是仪表表盘所在的圆形和圆形中的线条在识别过程中,往往识别的不准确,其原因有多种,例如,在图像识别过程中圆心定位不准,以及在采集表盘图像时反光等因素均会造成识别的不准确;而本公开实施例是根据各个第一旋转位置处的第一像素点数量去定位目标指针的位置,无需去识别仪表表盘所在的圆形的圆心,此外,即使反光对第一表盘图像造成干扰,反光在第一表盘图像中形成的线条基本上也不会与虚拟指针对应的第一旋转位置完全重合,则统计第一旋转位置处的第一像素点数量时,反光造成的影响很小,使得后续根据各个第一旋转位置处的第一像素点数量去定位目标指针的位置,也可以准确识别目标指针的位置。
在本公开实施例中,通过预先构建虚拟指针,采用虚拟指针在第一表盘图像中进行旋转扫描,通过对比各个第一旋转位置处的第一像素点数量,以检测目标指针所在的位置,并通过预设的角度值与刻度值之间的对应关系,确定目标指针的刻度值,由于是通过各个第一旋转位置处的第一像素点数量去定位目标指针的位置,因此,可以准确识别目标指针的位置,使得目标指针的读数更精确。
参照图3,示出了本公开实施例的一种指针定位方法的具体流程图,具体可以包括如下步骤:
步骤301,在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量。
在本公开实施例中,预先构建虚拟指针,采用预先构建的虚拟指针在第一表盘图像中进行旋转扫描,检测虚拟指针在第一表盘图像中的每个第一旋转位置处的第一像素点数量,其中,虚拟指针从基准位置开始以第一预设角度为间隔旋转一周,每旋转第一预设角度,虚拟指针在第一表盘图像中的位置为第一旋转位置。
例如,第一预设角度为1°,虚拟指针从基准位置开始,以第一预设角度1°为间隔旋转一周,每旋转一个第一预设角度1°,检测虚拟指针此时在第一表盘图像中的第一旋转位置处的第一像素点数量,因此,可得到360个第一旋转位置处的第一像素点数量。
参照图4,示出了本公开实施例的虚拟指针的构建流程图,具体的,在步骤301之前,还包括步骤401至步骤407:
步骤401,获取摄像头采集的第二表盘图像;
步骤402,控制触控屏显示所述第二表盘图像;
步骤403,在接收到用户在所述触控屏上输入的圆心坐标的情况下,控制所述触控屏以预设的圆形图案显示所述圆心坐标所在的位置;
步骤404,在接收到用户对所述圆心坐标的第一确定操作的情况下,将所述圆心坐标所在的位置确定为所述虚拟指针的指针圆心;
步骤405,在接收到用户在所述触控屏上输入的指针长度的情况下,控制所述触控屏以预设的直线图案显示所述指针长度;所述直线图案的一端与所述指针圆心重合;
步骤406,在接收到用户对所述指针长度的第二确定操作的情况下,将所述指针长度确定为所述虚拟指针的指针长度;
步骤407,根据所述虚拟指针的指针圆心和所述虚拟指针的指针长度,构建所述虚拟指针。
在本公开实施例中,为了构建虚拟指针,首先,需要控制摄像头采集仪表表盘对应的第二表盘图像,获取摄像头采集的第二表盘图像,第二表盘图像为彩色图像;当然,也可对第二表盘图像后进行二值化处理,后续触控屏显示的也是二值化处理后的第二表盘图像。
接着,控制触控屏显示仪表表盘对应的第二表盘图像,并控制触控屏显示圆心坐标的输入框,用户可以在触控屏上的圆心坐标的输入框内输入圆心坐标,则触控屏接收到用户在触控屏上输入的圆心坐标,然后,控制触控屏以预设的圆形图案在第二表盘图像中显示圆心坐标所在的位置,例如,以绿色的圆形图案显示圆心坐标所在的位置,并在触控屏上显示一个确定选项和一个取消选项。用户观察预设的圆形图案与仪表表盘的指针中心是否重合,当重合时,用户可触控确定选项,则触控屏接收到用户对圆心坐标的第一确定操作,仪表中的处理器将圆心坐标所在的位置确定为虚拟指针的指针圆心;当用户观察预设的圆形图案与仪表表盘的指针中心不重合时,用户可触控取消选项,则触控屏接收到用户对圆心坐标的第一取消操作,仪表中的处理器控制触控屏重新显示圆心坐标的输入框,以供用户再次输入圆心坐标。
在确定了虚拟指针的指针圆心之后,可控制触控屏显示指针长度的输入框,用户可以在触控屏上的指针长度的输入框内输入指针长度,则触控屏接收到用户在触控屏上输入的指针长度,然后,控制触控屏以预设的直线图案在第二表盘图像中显示该指针长度,并且,预设的直线图案的一端与指针圆心重合,此外,还在触控屏上显示一个确定选项和一个取消选项。当用户观察预设的直线图案的长度位于目标指针的指针长度的70%至90%之间时,用户可通过触控确定选项,则触控屏接收到用户对指针长度的第二确定操作,仪表中的处理器将输入的指针长度确定为虚拟指针的指针长度;当用户观察预设的直线图案的长度没有位于目标指针的指针长度的70%至90%之间时,用户可通过触控取消选项,则触控屏接收到用户对指针长度的第二取消操作,仪表中的处理器控制触控屏重新显示指针长度的输入框,以供用户再次输入指针长度。
最后,根据确定的虚拟指针的指针圆心和虚拟指针的指针长度,构建虚拟指针。
通过用户手动输入圆心坐标和指针长度,以构建虚拟指针,减少了仪表中的处理器的运算量,降低了算法难度,提高处理器运行的稳定性。
步骤302,根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置。
在本公开实施例中,根据检测到的虚拟指针在第一表盘图像中的各个第一旋转位置处的第一像素点数量,确定虚拟指针所在的第一目标位置。
具体的,步骤302可以包括子步骤S11、子步骤S12和子步骤S13:
子步骤S11,当各个所述第一旋转位置对应的第一像素点数量中的第一最大值为一个时,将所述第一最大值所对应的第一旋转位置确定为所述第一目标位置;
子步骤S12,当各个所述第一旋转位置对应的第一像素点数量中的第一最大值为多个时,确定多个第一最大值对应的第一旋转位置的中心位置;
子步骤S13,将所述多个第一最大值对应的第一旋转位置的中心位置确定为所述第一目标位置。
在实际应用中,各个第一旋转位置处的第一像素点数量中的第一最大值可以为一个,也可以为多个。当各个第一旋转位置处的第一像素点数量中的第一最大值为一个时,将第一最大值所对应的第一旋转位置确定为第一目标位置;当各个第一旋转位置处的第一像素点数量中的第一最大值为多个时,确定多个第一最大值对应的第一旋转位置的中心位置,将多个第一最大值对应的第一旋转位置的中心位置确定为第一目标位置。
需要说明的是,当各个第一旋转位置处的第一像素点数量中的第一最大值为多个时,这多个第一最大值所对应的第一旋转位置需要是连续的。
例如,第一旋转位置1、第一旋转位置2和第一旋转位置3处的第一像素点数量均为第一最大值,第一预设角度为1°,第一旋转位置1与基准位置之间的角度为184°,第一旋转位置2与基准位置之间的角度为185°,第一旋转位置3与基准位置之间的角度为186°,计算着三个角度的平均值,得到平均角度为185°,即第一旋转位置1、第一旋转位置2和第一旋转位置3的中心位置为第一旋转位置2,则将第一旋转位置2确定为第一目标位置。
步骤303,根据所述第一目标位置,确定所述虚拟指针在所述第一表盘图像中的旋转范围。
在本公开实施例中,若第一预设角度选取的数值较大,即步骤301得到的每个第一旋转位置处的第一像素点数量为粗扫描结果,为了提高目标指针的定位精度,还需要根据第一目标位置,确定虚拟指针再次在第一表盘图像中进行旋转扫描的旋转范围。
具体的,步骤303可以包括子步骤S21、子步骤S22、子步骤S23和子步骤S24:
子步骤S21,确定所述第一目标位置与所述基准位置之间的第一角度值;
子步骤S22,将所述第一角度值与第一预设值的和值,确定为所述虚拟指针在所述第一表盘图像中的旋转范围的最大值;
子步骤S23,将所述第一角度值与第二预设值的差值,确定为所述虚拟指针在所述第一表盘图像中的旋转范围的最小值;
子步骤S24,根据所述旋转范围的最大值和所述旋转范围的最小值,确定所述虚拟指针在所述第一表盘图像中的旋转范围。
在本公开实施例中,在确定了第一目标位置之后,确定第一目标位置与基准位置之间的第一角度值。假设虚拟指针从基准位置旋转了N个第一预设角度才到达第一目标位置,且第一预设角度为M,则第一目标位置与基准位置之间的第一角度值为N*M。
接着,在第一角度值的基础上加上第一预设值,将第一角度值与第一预设值的和值,确定为虚拟指针在第一表盘图像中的旋转范围的最大值;在第一角度值的基础上减去第二预设值,将第一角度值与第二预设值的差值,确定为虚拟指针在第一表盘图像中的旋转范围的最小值。其中,第一预设值和第二预设值可根据经验人为设定。
最后,根据旋转范围的最大值和旋转范围的最小值,确定虚拟指针在第一表盘图像中的旋转范围。
例如,第一预设角度M为1°,N为185,即虚拟指针从基准位置旋转了185个第一预设角度才到达第一目标位置,则第一目标位置与基准位置之间的第一角度值为185°,假设第一预设值和第二预设值均为3°,则虚拟指针在第一表盘图像中的旋转范围的最大值为188°,虚拟指针在第一表盘图像中的旋转范围的最小值为182°。
步骤304,在所述虚拟指针在所述旋转范围内按照第二预设角度旋转的情况下,检测多个第二旋转位置分别对应的第二像素点数量。
在本公开实施例中,虚拟指针在第一表盘图像中的旋转范围内再次进行旋转扫描,检测虚拟指针在旋转范围内的每个第二旋转位置处的第二像素点数量,每个第二旋转位置处的第二像素点数量为细扫描结果。其中,虚拟指针从旋转范围的最小值开始到旋转范围的最大值为止,以第二预设角度为间隔进行旋转,每旋转第二预设角度,虚拟指针在第一表盘图像中的位置为第二旋转位置。
如图5所示,目标指针21位于根据第一目标位置确定的旋转范围内,为了进一步更精确地定位目标指针21的位置,设置第二预设角度为0.1°,虚拟指针22从旋转范围的最小值开始到旋转范围的最大值为止,以第二预设角度0.1°进行旋转,每旋转一个第二预设角度0.1°,检测虚拟指针此时在第一表盘图像中的第二旋转位置处的第二像素点数量;其中,左侧显示的虚拟 指针22表示虚拟指针22开始进行旋转扫描的位置,即旋转范围的最小值对应的位置,右侧显示的虚拟指针22表示虚拟指针22结束旋转扫描的位置,即旋转范围的最大值对应的位置。
例如,虚拟指针在第一表盘图像中的旋转范围的最大值为188°,旋转范围的最小值为182°,则从旋转范围的最小值182°的位置开始旋转一个第二预设角度0.1°,此时检测第一个第二旋转位置处的第二像素点数量,接着,从与基准位置之间的角度为182.1°的位置开始再旋转一个第二预设角度0.1°,此时检测第二个第二旋转位置处的第二像素点数量,然后,从与基准位置之间的角度为182.2°的位置开始再旋转一个第二预设角度,此时检测第三个第二旋转位置处的第二像素点数量,以此类推,总共可到60个第二旋转位置处的第二像素点数量。
其中,第二像素点数量指的是第二旋转位置处的灰度值为255或灰度值为0的像素点的数量。具体统计的是灰度值为255还是灰度值为0的像素点的数量,是根据第一表盘图像中的仪表表盘的背景颜色和目标指针的颜色确定的。
需要说明的是,虚拟指针22的旋转方向如图5中的箭头所示,即虚拟指针22从旋转范围的最小值开始到旋转范围的最大值为止;当然,虚拟指针22的旋转方向也可以是从旋转范围的最大值开始到旋转范围的最小值为止。
步骤305,根据各个所述第二旋转位置处的第二像素点数量,确定所述虚拟指针所在的第二目标位置。
在本公开实施例中,根据检测到的虚拟指针在旋转范围内的各个第二旋转位置处的第二像素点数量,确定第二目标位置。
具体的,步骤305可以包括子步骤S31、子步骤S32和子步骤S33:
子步骤S31,当各个所述第二旋转位置对应的第二像素点数量中的第二最大值为一个时,将所述第二最大值所对应的第二旋转位置确定为所述第二目标位置;
子步骤S32,当各个所述第二旋转位置对应的第二像素点数量中的第二最大值为多个时,确定多个第二最大值对应的第二旋转位置的中心位置;
子步骤S33,将所述多个第二最大值对应的第二旋转位置的中心位置确定为所述第二目标位置。
在实际应用中,各个第二旋转位置处的第二像素点数量中的第二最大值可以为一个,也可以为多个。当各个第二旋转位置处的第二像素点数量中的第二最大值为一个时,将第二最大值所对应的第二旋转位置确定为第二目标位置;当各个第二旋转位置处的第二像素点数量中的第二最大值为多个时,确定多个第二最大值对应的第二旋转位置的中心位置,将多个第二最大值对应的第二旋转位置的中心位置确定为第二目标位置。
需要说明的是,当各个第二旋转位置处的第二像素点数量中的第二最大值为多个时,这多个第二最大值所对应的第二旋转位置需要是连续的。
例如,旋转范围的最大值为188°,旋转范围的最小值为182°,第二预设角度为0.1°,在旋转范围内检测到第二旋转位置1、第二旋转位置2和第二旋转位置3处的第二像素点数量均为第二最大值,第二旋转位置1与基准位置之间的角度为185°,第二旋转位置2与基准位置之间的角度为185.1°,第二旋转位置3与基准位置之间的角度为185.2°,计算这三个角度的平均值,得到平均角度为185.1°,即第二旋转位置1、第二旋转位置2和第二旋转位置3的中心位置为第二旋转位置2,则将第二旋转位置2确定为第二目标位置。
步骤306,根据所述第二目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
在本公开实施例中,根据确定的第二目标位置,确定第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值,第二目标位置也就是第一表盘图像对应的仪表表盘中的目标指针所在的位置。
具体的,步骤306可以包括子步骤S41和子步骤S42:
子步骤S41,确定所述第二目标位置与所述基准位置之间的第二角度值;
子步骤S42,将所述第二角度值确定为所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
在本公开实施例中,在确定了第二目标位置之后,确定第二目标位置与基准位置之间的第二角度值。具体地,子步骤S41可以包括子步骤S411和子步骤S412:
子步骤S411,确定所述虚拟指针从所述旋转范围的最小值旋转至所述第二目标位置的第二旋转次数,计算所述第二旋转次数与所述第二预设角度的第二乘积值;
子步骤S412,将所述第二乘积值与所述旋转范围的最小值的和值,确定为所述第二角度值。
示例地,假设虚拟指针在第一表盘图像中的旋转范围的最小值为L,虚拟指针从旋转范围的最小值开始旋转了X个第二预设角度才到达第二目标位置,即第二旋转次数为X,且第二预设角度为Y,第二乘积值为X*Y,则第二目标位置与基准位置之间的第二角度值为旋转范围的最小值与第二乘积值的和值,即为L+X*Y。
将第二目标位置与基准位置之间的第二角度值,确定为第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值。
例如,旋转范围的最小值L为182°,第二预设角度Y为0.1°,X为31,则目标指针与基准位置之间的目标角度值为185.1°。
步骤307,根据所述目标角度值,从预设的角度值与刻度值之间的对应关 系中,查找所述目标指针对应的目标刻度值。
在本公开实施例中,预先建立预设的角度值与刻度值之间的对应关系,在确定了目标指针与基准位置之间的目标角度值,从预设的角度值与刻度值之间的对应关系中,查找目标角度值对应的目标刻度值,即得到目标指针对应的目标刻度值。
参照图6,示出了本公开实施例的预设的角度值与刻度值之间的对应关系的生成流程图,在步骤307之前,还包括步骤601至步骤605:
步骤601,在接收到用户在所述触控屏上输入的所述虚拟指针与所述基准位置之间的第三角度值时,控制所述触控屏显示所述虚拟指针在所述第二表盘图像中的第一位置;
步骤602,在接收到用户对所述第三角度值的第三确定操作的情况下,将所述第三角度值确定为量程起始角度值;
步骤603,在接收到用户在所述触控屏上输入的所述虚拟指针与所述基准位置之间的第四角度值时,控制所述触控屏显示所述虚拟指针在所述第二表盘图像中的第二位置;
步骤604,在接收到用户对所述第四角度值的第四确定操作的情况下,将所述第四角度值确定为量程终止角度值;
步骤605,根据用户在所述触控屏上输入的量程值、所述量程起始角度值和所述量程终止角度值,确定预设的角度值与刻度值之间的对应关系;所述量程值包括最小测量值和最大测量值。
在本公开实施例中,为了确定预设的角度值与刻度值之间的对应关系,首先,需要控制触控屏显示仪表表盘对应的第二表盘图像,并控制触控屏显示量程起始角度值的输入框,用户可以在触控屏上的量程起始角度值的输入框内输入第三角度值,则触控屏接收到用户在触控屏上输入的虚拟指针与基准位置之间的第三角度值,然后,控制触控屏显示虚拟指针在第二表盘图像中的第一位置,此时,第一位置与基准位置之间的角度为第三角度值,并且,在触控屏上显示一个确定选项和一个取消选项。当用户观察虚拟指针在第二表盘图像中的第一位置,与量程值中的最小测量值对应的刻度重合时,用户可触控确定选项,则触控屏接收到用户对第三角度值的第三确定操作,仪表中的处理器将第三角度值确定为量程起始角度值;当用户观察虚拟指针在第二表盘图像中的第一位置,与量程值中的最小测量值对应的刻度不重合时,用户可触控取消选项,则触控屏接收到用户对第三角度值的第三取消操作,仪表中的处理器控制触控屏重新显示量程起始角度值的输入框,以供用户再次输入第三角度值。
相应的,控制触控屏显示量程终止角度值的输入框,用户可以在触控屏上的量程终止角度值的输入框内输入第四角度值,则触控屏接收到用户在触 控屏上输入的虚拟指针与基准位置之间的第四角度值,然后,控制触控屏显示虚拟指针在第二表盘图像中的第二位置,此时,第二位置与基准位置之间的角度为第四角度值,并且,在触控屏上显示一个确定选项和一个取消选项。当用户观察虚拟指针在第二表盘图像中的第二位置,与量程值中的最大测量值对应的刻度重合时,用户可触控确定选项,则触控屏接收到用户对第四角度值的第四确定操作,仪表中的处理器将第四角度值确定为量程终止角度值;当用户观察虚拟指针在第二表盘图像中的第二位置,与量程值中的最大测量值对应的刻度不重合时,用户可触控取消选项,则触控屏接收到用户对第四角度值的第四取消操作,仪表中的处理器控制触控屏重新显示量程终止角度值的输入框,以供用户再次输入第四角度值。
接着,还需要控制触控屏显示量程输入框,用户在触控屏上的量程输入框内输入量程值,量程值包括最小测量值和最大测量值。最后,仪表中的处理器,根据用户在触控屏上输入的量程值、确定的量程起始角度值和量程终止角度值,确定预设的角度值与刻度值之间的对应关系。
由于量程值中的各个测量值对应的刻度是均匀分布在仪表表盘中的因此,角度值与刻度对应的刻度值之间呈线性关系,如图2所示,在已知量程值中的最小测量值为0,最大测量值为1.6,以及量程起始角度值和量程终止角度值之后,可直接根据最小测量值、最大测量值、量程起始角度值和量程终止角度值,确定角度值与刻度值之间的对应关系。
需要说明的是,在生成预设的角度值与刻度值之间的对应关系时,其采用的虚拟指针的指针长度可以与目标指针的指针长度一致,以便于用户观察虚拟指针是否与最小测量值对应的刻度、最大测量值对应的刻度重合;而在实际检测目标指针所指的目标刻度值时,虚拟指针的指针长度需要设置为目标指针的指针长度的70%至90%。
通过用户手动输入最小测量值、最大测量值、量程起始角度值和量程终止角度值,以生成角度值与刻度值之间的对应关系,减少了仪表中的处理器的运算量,降低了算法难度,提高处理器运行的稳定性。
需要说明的是,本公开实施例中的第二表盘图像指的是在构建虚拟指针以及生成角度值与刻度值之间的对应关系时,摄像头采集的表盘图像,而第一表盘图像指的是在测量目标指针的刻度值时,摄像头采集的表盘图像。
在本公开实施例中,通过预先构建虚拟指针,采用虚拟指针在第一表盘图像中先进行粗扫描,得到各个第一旋转位置处的第一像素点数量,以确定第一目标位置,基于第一目标位置确定虚拟指针在第一表盘图像中进行细扫描时的旋转范围,采用虚拟指针在旋转范围内进行细扫描,得到旋转范围内的各个第二旋转位置处的第二像素点数量,以确定第二目标位置,然后进一步确定目标指针与基准位置之间的目标角度值,最后通过预设的角度值与刻 度值之间的对应关系,确定目标指针的刻度值。由于是通过各个第一旋转位置处的第一像素点数量,以及各个第二旋转位置处的第二像素点数量去定位目标指针的位置,因此,可以准确识别目标指针的位置,使得目标指针的读数更精确;并且,通过先粗扫描再细扫描的方式,可以有效减少处理器的运算量。
参照图7,示出了本公开实施例的一种指针定位装置的结构框图。
该指针定位装置700包括:
第一检测模块701,被配置为在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量;
第一目标位置确定模块702,被配置为根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置;
目标角度值确定模块703,被配置为根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值;
目标刻度值查找模块704,被配置为根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值。
可选地,所述目标角度值确定模块703,包括:
旋转范围确定子模块,被配置为根据所述第一目标位置,确定所述虚拟指针在所述第一表盘图像中的旋转范围;
检测子模块,被配置为在所述虚拟指针在所述旋转范围内按照第二预设角度旋转的情况下,检测多个第二旋转位置分别对应的第二像素点数量;
第二目标位置确定子模块,被配置为根据各个所述第二旋转位置对应的第二像素点数量,确定所述虚拟指针所在的第二目标位置;
目标角度值确定子模块,被配置为根据所述第二目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
可选地,第一目标位置确定模块702,包括:
目标位置第一确定子模块,被配置为当各个所述第一旋转位置处的第一像素点数量中的第一最大值为一个时,将所述第一最大值所对应的第一旋转位置确定为所述第一目标位置;
中心位置确定子模块,被配置为当各个所述第一旋转位置处的第一像素点数量中的第一最大值为多个时,确定多个第一最大值对应的第一旋转位置的中心位置;
目标位置第二确定子模块,被配置为将所述多个第一最大值对应的第一旋转位置的中心位置确定为所述第一目标位置。
可选地,所述旋转范围确定子模块,包括:
第一角度值确定单元,被配置为确定所述第一目标位置与所述基准位置之间的第一角度值;
最大值确定单元,被配置为将所述第一角度值与第一预设值的和值,确定为所述虚拟指针在所述第一表盘图像中的旋转范围的最大值;
最小值确定单元,被配置为将所述第一角度值与第二预设值的差值,确定为所述虚拟指针在所述第一表盘图像中的旋转范围的最小值;
旋转范围确定单元,被配置为根据所述旋转范围的最大值和所述旋转范围的最小值,确定所述虚拟指针在所述第一表盘图像中的旋转范围。
可选地,所述第二目标位置确定子模块,包括:
目标位置第一确定单元,被配置为当各个所述第二旋转位置处的第二像素点数量中的第二最大值为一个时,将所述第二最大值所对应的第二旋转位置确定为所述第二目标位置;
中心位置确定单元,被配置为当各个所述第二旋转位置处的第二像素点数量中的第二最大值为多个时,确定多个第二最大值对应的第二旋转位置的中心位置;
目标位置第二确定单元,被配置为将所述多个第二最大值对应的第二旋转位置的中心位置确定为所述第二目标位置。
可选地,所述目标角度值确定子模块,包括:
第二角度值确定单元,被配置为确定所述第二目标位置与所述基准位置之间的第二角度值;
目标角度值确定单元,被配置为将所述第二角度值确定为所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
可选地,所述指针定位装置700,还包括:
第二表盘图像获取模块,被配置为获取摄像头采集的第二表盘图像;
第二表盘图像显示模块,被配置为控制触控屏显示所述第二表盘图像;
圆心坐标显示模块,被配置为在接收到用户在所述触控屏上输入的圆心坐标的情况下,控制所述触控屏以预设的圆形图案显示所述圆心坐标所在的位置;
指针圆心确定模块,被配置为在接收到用户对所述圆心坐标的第一确定操作的情况下,将所述圆心坐标所在的位置确定为所述虚拟指针的指针圆心;
指针长度显示模块,被配置为在接收到用户在所述触控屏上输入的指针长度的情况下,控制所述触控屏以预设的直线图案显示所述指针长度;所述直线图案的一端与所述指针圆心重合;
指针长度确定模块,被配置为在接收到用户对所述指针长度的第二确定操作的情况下,将所述指针长度确定为所述虚拟指针的指针长度;
虚拟指针构建模块,被配置为根据所述虚拟指针的指针圆心和所述虚拟指针的指针长度,构建所述虚拟指针。
可选地,所述指针定位装置700,还包括:
第一位置显示模块,被配置为在接收到用户在所述触控屏上输入的所述虚拟指针与所述基准位置之间的第三角度值时,控制所述触控屏显示所述虚拟指针在所述第二表盘图像中的第一位置;
量程起始角度值确定模块,被配置为在接收到用户对所述第三角度值的第三确定操作的情况下,将所述第三角度值确定为量程起始角度值;
第二位置显示模块,被配置为在接收到用户在所述触控屏上输入的所述虚拟指针与所述基准位置之间的第四角度值时,控制所述触控屏显示所述虚拟指针在所述第二表盘图像中的第二位置;
量程终止角度值确定模块,被配置为在接收到用户对所述第四角度值的第四确定操作的情况下,将所述第四角度值确定为量程终止角度值;
对应关系确定模块,被配置为根据用户在所述触控屏上输入的量程值、所述量程起始角度值和所述量程终止角度值,确定预设的角度值与刻度值之间的对应关系;所述量程值包括最小测量值和最大测量值。
可选地,所述虚拟指针的指针长度为所述目标指针的指针长度的70%至90%。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
在本公开实施例中,通过预先构建虚拟指针,采用虚拟指针在第一表盘图像中进行旋转扫描,通过对比各个第一旋转位置处的第一像素点数量,以检测目标指针所在的位置,并通过预设的角度值与刻度值之间的对应关系,确定目标指针的刻度值,由于是通过各个第一旋转位置处的第一像素点数量去定位目标指针的位置,因此,可以准确识别目标指针的位置,使得目标指针的读数更精确。
参照图8,示出了本公开实施例的一种仪表的组成结构图。
本公开实施例还提供了一种仪表800,包括上述的指针定位装置700。
此外,该仪表800还包括仪表本体801、摄像头802和触控屏803,该仪表本体801包括仪表表盘20和目标指针21。
其中,摄像头802,被配置为采集第一表盘图像(实际上采集的是第三表盘图像,但是在采集后需要对第三表盘图像进行二值化处理,得到第一表盘图像)和第二表盘图像;触控屏803,被配置为接收用户输入的圆心坐标、指针长度、第三角度值、第四角度值和量程值,以及显示第二表盘图像。
此外,触控屏803还可接收用户的第一确定操作、第一取消操作、第二确定操作、第二取消操作、第三确定操作、第三取消操作、第四确定操作和第四取消操作。
需要说明的是,在实际应用中,指针定位装置700可以为仪表800中的处理器,通过仪表800中的处理器实现指针定位的功能。
在本公开实施例中,通过预先构建虚拟指针,采用虚拟指针在第一表盘图像中进行旋转扫描,通过对比各个第一旋转位置处的第一像素点数量,以检测目标指针所在的位置,并通过预设的角度值与刻度值之间的对应关系,确定目标指针的刻度值,由于是通过各个第一旋转位置处的第一像素点数量去定位目标指针的位置,因此,可以准确识别目标指针的位置,使得目标指针的读数更精确。
对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本公开并不受所描述的动作顺序的限制,因为依据本公开,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本公开所必须的。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
本公开的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本公开实施例的计算处理设备中的一些或者全部部件的一些或者全部功能。本公开还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本公开的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图9示出了可以实现根据本公开的方法的计算处理设备。该计算处理设备传统上包括处理器1010和以存储器1020形式的计算机程序产品或者计算机可读介质。存储器1020可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1020具有用于执行上述方法中的任何方法步骤的程序代码1031的存储空间1030。例如,用于程序代码的存储空间1030可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1031。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图10所述的便携式或者固定存储单元。 该存储单元可以具有与图9的计算处理设备中的存储器1020类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1031’,即可以由例如诸如1010之类的处理器读取的代码,这些代码当由计算处理设备运行时,导致该计算处理设备执行上面所描述的方法中的各个步骤。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本公开的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上对本公开所提供的一种指针定位方法、装置及仪表,进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。

Claims (23)

  1. 一种指针定位方法,包括:
    在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量;根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置;
    根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值;
    根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值。
  2. 根据权利要求1所述的方法,所述第一预设角度大于预设阈值,所述根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值的步骤,包括:
    根据所述第一目标位置,确定所述虚拟指针在所述第一表盘图像中的旋转范围;
    在所述虚拟指针在所述旋转范围内按照第二预设角度旋转的情况下,检测多个第二旋转位置分别对应的第二像素点数量;
    根据各个所述第二旋转位置对应的第二像素点数量,确定所述虚拟指针所在的第二目标位置;
    根据所述第二目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
  3. 根据权利要求1所述的方法,所述根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置的步骤,包括:
    当各个所述第一旋转位置对应的第一像素点数量中的第一最大值为一个时,将所述第一最大值所对应的第一旋转位置确定为所述第一目标位置;
    当各个所述第一旋转位置对应的第一像素点数量中的第一最大值为多个时,确定多个第一最大值对应的第一旋转位置的中心位置;
    将所述多个第一最大值对应的第一旋转位置的中心位置确定为所述第一目标位置。
  4. 根据权利要求2所述的方法,所述根据所述第一目标位置,确定所述虚拟指针在所述第一表盘图像中的旋转范围的步骤,包括:
    确定所述第一目标位置与所述基准位置之间的第一角度值;
    将所述第一角度值与第一预设值的和值,确定为所述虚拟指针在所述第一表盘图像中的旋转范围的最大值;
    将所述第一角度值与第二预设值的差值,确定为所述虚拟指针在所述第一表盘图像中的旋转范围的最小值;
    根据所述旋转范围的最大值和所述旋转范围的最小值,确定所述虚拟指针在所述第一表盘图像中的旋转范围。
  5. 根据权利要求2所述的方法,所述根据各个所述第二旋转位置对应的第二像素点数量,确定第二目标位置的步骤,包括:
    当各个所述第二旋转位置对应的第二像素点数量中的第二最大值为一个时,将所述第二最大值所对应的第二旋转位置确定为所述第二目标位置;
    当各个所述第二旋转位置对应的第二像素点数量中的第二最大值为多个时,确定多个第二最大值对应的第二旋转位置的中心位置;
    将所述多个第二最大值对应的第二旋转位置的中心位置确定为所述第二目标位置。
  6. 根据权利要求2所述的方法,根据所述第二目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值的步骤,包括:
    确定所述第二目标位置与所述基准位置之间的第二角度值;
    将所述第二角度值确定为所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
  7. 根据权利要求6所述的方法,所述确定所述第二目标位置与所述基准位置之间的第二角度值的步骤,包括:
    确定所述虚拟指针从所述旋转范围的最小值旋转至所述第二目标位置的第二旋转次数,计算所述第二旋转次数与所述第二预设角度的第二乘积值;
    将所述第二乘积值与所述旋转范围的最小值的和值,确定为所述第二角度值。
  8. 根据权利要求1所述的方法,所述第一预设角度小于预设阈值,所述根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值的步骤,包括:
    确定所述第一目标位置与所述基准位置之间的第一角度值;
    将所述第一角度值确定为所述第一表盘图像对应的仪表表盘中的目标指针与所述基准位置之间的目标角度值。
  9. 根据权利要求8所述的方法,所述确定所述第一目标位置与所述基准位置之间的第一角度值的步骤,包括:
    确定所述虚拟指针从所述基准位置旋转至所述第一目标位置的第一旋转次数,计算所述第一旋转次数与所述第一预设角度的第一乘积值;
    将所述第一乘积值确定为所述第一角度值。
  10. 根据权利要求1所述的方法,所述在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量的步骤之前,还包括:
    获取摄像头采集的第二表盘图像;
    控制触控屏显示所述第二表盘图像;
    在接收到用户在所述触控屏上输入的圆心坐标的情况下,控制所述触控屏以预设的圆形图案显示所述圆心坐标所在的位置;
    在接收到用户对所述圆心坐标的第一确定操作的情况下,将所述圆心坐标所在的位置确定为所述虚拟指针的指针圆心;
    在接收到用户在所述触控屏上输入的指针长度的情况下,控制所述触控屏以预设的直线图案显示所述指针长度;所述直线图案的一端与所述指针圆心重合;
    在接收到用户对所述指针长度的第二确定操作的情况下,将所述指针长度确定为所述虚拟指针的指针长度;
    根据所述虚拟指针的指针圆心和所述虚拟指针的指针长度,构建所述虚拟指针。
  11. 根据权利要求1所述的方法,在所述根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值的步骤之前,还包括:
    在接收到用户在所述触控屏上输入的所述虚拟指针与所述基准位置之间的第三角度值时,控制所述触控屏显示所述虚拟指针在所述第二表盘图像中的第一位置;
    在接收到用户对所述第三角度值的第三确定操作的情况下,将所述第三角度值确定为量程起始角度值;
    在接收到用户在所述触控屏上输入的所述虚拟指针与所述基准位置之间的第四角度值时,控制所述触控屏显示所述虚拟指针在所述第二表盘图像中的第二位置;
    在接收到用户对所述第四角度值的第四确定操作的情况下,将所述第四角度值确定为量程终止角度值;
    根据用户在所述触控屏上输入的量程值、所述量程起始角度值和所述量程终止角度值,确定预设的角度值与刻度值之间的对应关系;所述量程值包括最小测量值和最大测量值。
  12. 根据权利要求1所述的方法,所述虚拟指针从所述基准位置开始以所述第一预设角度为间隔旋转,每旋转所述第一预设角度,所述虚拟指针在所述第一表盘图像中的位置为所述第一旋转位置。
  13. 根据权利要求1至12中任一项所述的方法,所述虚拟指针的指针长度为所述目标指针的指针长度的70%至90%。
  14. 根据权利要求1至12中任一项所述的方法,所述虚拟指针的指针宽度小于所述目标指针的指针宽度。
  15. 根据权利要求1所述的方法,所述第一像素点的数量为所述第一旋转位置对应的灰度值为255或灰度值为0的像素点的数量。
  16. 一种指针定位装置,包括:
    第一检测模块,被配置为在虚拟指针在第一表盘图像中按照第一预设角度旋转的情况下,检测多个第一旋转位置分别对应的第一像素点数量;
    第一目标位置确定模块,被配置为根据各个所述第一旋转位置对应的第一像素点数量,确定所述虚拟指针所在的第一目标位置;
    目标角度值确定模块,被配置为根据所述第一目标位置,确定所述第一表盘图像对应的仪表表盘中的目标指针与基准位置之间的目标角度值;
    目标刻度值查找模块,被配置为根据所述目标角度值,从预设的角度值与刻度值之间的对应关系中,查找所述目标指针对应的目标刻度值。
  17. 一种仪表,包括如权利要求16所述的指针定位装置。
  18. 根据权利要求17所述的仪表,所述仪表还包括仪表本体、摄像头和触控屏;所述仪表本体包括仪表表盘和目标指针;
    所述摄像头,被配置为采集第一表盘图像和第二表盘图像;
    所述触控屏,被配置为接收用户输入的圆心坐标、指针长度、第三角度值、第四角度值和量程值,以及显示所述第二表盘图像。
  19. 根据权利要求18所述的仪表,所述第一表盘图像为对所述摄像头采集的第三表盘图像进行二值化处理得到的图像;
    其中,所述第三表盘图像为所述摄像头采集的所述仪表表盘对应的彩色图像。
  20. 根据权利要求18所述的仪表,所述触控屏,还被配置为接收用户的第一确定操作、第一取消操作、第二确定操作、第二取消操作、第三确定操作、第四确定操作以及第四取消操作。
  21. 一种计算处理设备,其中,包括:
    存储器,其中存储有计算机可读代码;以及
    一个或多个处理器,当所述计算机可读代码被所述一个或多个处理器执行时,所述计算处理设备执行如权利要求1-15中任一项所述的指针定位方法。
  22. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算处理设备上运行时,导致所述计算处理设备执行根据权利要求1-15中任一项所述的指针定位方法。
  23. 一种计算机可读介质,其中存储了如权利要求22所述的计算机程序。
PCT/CN2021/083331 2020-03-27 2021-03-26 指针定位方法、装置及仪表 WO2021190640A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/628,162 US20240036658A1 (en) 2020-03-27 2021-03-26 Pointer positioning method and apparatus, and instrument

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010232222.1A CN111428659A (zh) 2020-03-27 2020-03-27 一种指针定位方法、装置及仪表
CN202010232222.1 2020-03-27

Publications (1)

Publication Number Publication Date
WO2021190640A1 true WO2021190640A1 (zh) 2021-09-30

Family

ID=71549106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083331 WO2021190640A1 (zh) 2020-03-27 2021-03-26 指针定位方法、装置及仪表

Country Status (3)

Country Link
US (1) US20240036658A1 (zh)
CN (1) CN111428659A (zh)
WO (1) WO2021190640A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114371897A (zh) * 2021-12-30 2022-04-19 歌尔科技有限公司 一种表盘界面显示方法、装置、设备及介质
CN116012828A (zh) * 2022-12-02 2023-04-25 长扬科技(北京)股份有限公司 指针式仪表识别方法、装置、电子设备及存储介质
CN116071604A (zh) * 2023-03-03 2023-05-05 北京尚优力达科技有限公司 一种基于图像的指针表识别方法及装置
CN117372937A (zh) * 2023-12-07 2024-01-09 江西理工大学南昌校区 一种基于指针仪表的数据读取方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428659A (zh) * 2020-03-27 2020-07-17 京东方科技集团股份有限公司 一种指针定位方法、装置及仪表
CN111860464B (zh) * 2020-08-07 2021-12-07 成都交大光芒科技股份有限公司 变电所辅助监控系统指针读数识别补偿方法及装置
CN112307887B (zh) * 2020-09-02 2023-04-21 国网浙江省电力有限公司嘉兴供电公司 一种sf6气体压力智能在线监测预警方法及系统
CN113269193A (zh) * 2021-06-08 2021-08-17 上海高德威智能交通系统有限公司 指针式表计的示数读取方法、装置及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1789923A (zh) * 2004-12-16 2006-06-21 赵建洋 一种指针表自动认读方法
JP2011196713A (ja) * 2010-03-17 2011-10-06 Fujitsu Ltd 算出装置、プログラム及び算出方法
CN103714329A (zh) * 2013-12-31 2014-04-09 长安大学 一种仪表指针识别的检测算法
CN110111387A (zh) * 2019-04-19 2019-08-09 南京大学 一种基于表盘特征的指针表定位及读数算法
CN111428659A (zh) * 2020-03-27 2020-07-17 京东方科技集团股份有限公司 一种指针定位方法、装置及仪表
CN112258379A (zh) * 2020-10-22 2021-01-22 京东方科技集团股份有限公司 图像处理方法、装置、设备及存储介质
CN112347877A (zh) * 2020-10-27 2021-02-09 京东方科技集团股份有限公司 仪表识别方法及系统、电子设备和可读存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105091922B (zh) * 2014-05-04 2019-09-20 广东工业大学 一种基于虚拟表盘的指针表读数识别方法
CN104484857B (zh) * 2014-12-26 2017-08-18 国网重庆市电力公司电力科学研究院 一种仪表数据读取方法及系统
US10108874B2 (en) * 2017-03-06 2018-10-23 Intelligent Security Systems Corporation Systems and methods for evaluating readings of gauge dials
CN110245654B (zh) * 2018-11-20 2024-06-07 浙江大华技术股份有限公司 指针读数识别方法及装置、计算机装置及可读存储介质
CN110059622A (zh) * 2019-04-18 2019-07-26 华北电力大学(保定) 一种基于无线传感器网络的指针式仪表示值识别系统
CN110633679B (zh) * 2019-09-19 2022-04-08 湘潭大学 一种基于遗传算法的指针式仪表示数自动识别方法及系统
US11443133B2 (en) * 2019-12-10 2022-09-13 Ricoh Company, Ltd. Computer vision system for industrial equipment gauge digitization and alarms

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1789923A (zh) * 2004-12-16 2006-06-21 赵建洋 一种指针表自动认读方法
JP2011196713A (ja) * 2010-03-17 2011-10-06 Fujitsu Ltd 算出装置、プログラム及び算出方法
CN103714329A (zh) * 2013-12-31 2014-04-09 长安大学 一种仪表指针识别的检测算法
CN110111387A (zh) * 2019-04-19 2019-08-09 南京大学 一种基于表盘特征的指针表定位及读数算法
CN111428659A (zh) * 2020-03-27 2020-07-17 京东方科技集团股份有限公司 一种指针定位方法、装置及仪表
CN112258379A (zh) * 2020-10-22 2021-01-22 京东方科技集团股份有限公司 图像处理方法、装置、设备及存储介质
CN112347877A (zh) * 2020-10-27 2021-02-09 京东方科技集团股份有限公司 仪表识别方法及系统、电子设备和可读存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114371897A (zh) * 2021-12-30 2022-04-19 歌尔科技有限公司 一种表盘界面显示方法、装置、设备及介质
CN116012828A (zh) * 2022-12-02 2023-04-25 长扬科技(北京)股份有限公司 指针式仪表识别方法、装置、电子设备及存储介质
CN116071604A (zh) * 2023-03-03 2023-05-05 北京尚优力达科技有限公司 一种基于图像的指针表识别方法及装置
CN117372937A (zh) * 2023-12-07 2024-01-09 江西理工大学南昌校区 一种基于指针仪表的数据读取方法
CN117372937B (zh) * 2023-12-07 2024-03-29 江西理工大学南昌校区 一种基于指针仪表的数据读取方法

Also Published As

Publication number Publication date
US20240036658A1 (en) 2024-02-01
CN111428659A (zh) 2020-07-17

Similar Documents

Publication Publication Date Title
WO2021190640A1 (zh) 指针定位方法、装置及仪表
CN110363076B (zh) 人员信息关联方法、装置及终端设备
CN110659636B (zh) 基于深度学习的指针式仪表读数识别方法
JP2021184307A (ja) ビジョンシステムでラインを検出するためのシステム及び方法
CN109656408B (zh) 基于区域镜像的触控坐标计算方法、触控装置及移动终端
CN109165657A (zh) 一种基于改进sift的图像特征检测方法及装置
CN110852954B (zh) 指针式仪表的图像倾斜校正方法及系统
Mai et al. An automatic meter reading method based on one-dimensional measuring curve mapping
CN109634460B (zh) 一种基于区域镜像的触控识别方法、装置及触控显示装置
CN116051600A (zh) 产品检测轨迹的优化方法和装置
CN111950553A (zh) 一种指针式仪表自动对准方法及装置
JP2017068465A (ja) 情報処理装置、制御方法、及びプログラム
CN109241892B (zh) 一种仪表盘读取方法、仪表盘读取装置及电子设备
CN113050022B (zh) 一种基于旋转天线的图像定位方法、装置及终端设备
CN110446256B (zh) 一种基于超宽带的基站实现定位的方法及设备
CN110196422B (zh) 激光测距的测试方法、测试装置及移动终端
Wu et al. Lens distortion correction based on one chessboard pattern image
CN109444905B (zh) 一种基于激光的动态物体检测方法、装置及终端设备
CN108564571B (zh) 图像区域选取方法及终端设备
CN111598094B (zh) 基于深度学习的角度回归仪表读数识别方法、设备和系统
CN108898632B (zh) 一种仪表指针的旋转角度确定方法及装置
CN108985160B (zh) 一种确定指针式仪表读数的方法和装置
CN112906681A (zh) 一种仪表读数方法、装置、电子设备及存储介质
CN115565164B (zh) 仪表盘数值识别方法、装置、设备及存储介质
CN116907498A (zh) 一种可见光通信地图生成方法、装置、终端及介质

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: 21774178

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 17628162

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21774178

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15.05.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21774178

Country of ref document: EP

Kind code of ref document: A1