WO2018201638A1 - Image recognition based information collection method, mobile terminal and storage medium - Google Patents

Image recognition based information collection method, mobile terminal and storage medium Download PDF

Info

Publication number
WO2018201638A1
WO2018201638A1 PCT/CN2017/096881 CN2017096881W WO2018201638A1 WO 2018201638 A1 WO2018201638 A1 WO 2018201638A1 CN 2017096881 W CN2017096881 W CN 2017096881W WO 2018201638 A1 WO2018201638 A1 WO 2018201638A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
image
area
target object
feature information
Prior art date
Application number
PCT/CN2017/096881
Other languages
French (fr)
Chinese (zh)
Inventor
袁晖
李凝华
杨洋
Original Assignee
深圳市科迈爱康科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市科迈爱康科技有限公司 filed Critical 深圳市科迈爱康科技有限公司
Publication of WO2018201638A1 publication Critical patent/WO2018201638A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/243Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes

Definitions

  • the present invention relates to the field of Internet of Things technologies, and in particular, to an image acquisition method based on image recognition, a mobile terminal, and a computer readable storage medium.
  • the Internet of Things is an important part of the new generation of information technology and an important stage of development in the era of "informatization.” As the name suggests, the Internet of Things is the Internet that connects things.
  • the Internet of Things is widely used in the convergence of networks through communication-aware technologies such as intelligent sensing, identification technology and pervasive computing. It is also called the third wave of the development of the world information industry after computers and the Internet.
  • the main object of the present invention is to provide an image acquisition method based on image recognition, a mobile terminal and a computer readable storage medium, which aim to solve the technical problem that some specific objects in the prior art are difficult to digitize.
  • the present invention provides an image acquisition method based on image recognition, the method comprising the following steps:
  • the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
  • the present invention further provides a mobile terminal, the mobile terminal comprising: a memory, a processor, and an information collecting program stored on the memory and operable on the processor, the information
  • the acquisition program is configured to implement the steps of the image recognition based information collection method described.
  • the present invention also provides a computer readable storage medium having an information collection program stored thereon, the information acquisition program being implemented by a processor to implement the image recognition based The steps of the information collection method.
  • the present invention may determine a test area and a control area in the image to be identified according to a first preset positioning identifier in the image to be identified when the type of the target object is a test strip, and then extract the first in the test area. a feature information, and extracting second feature information in the comparison area, and then determining a corresponding indicator value according to the first feature information and the second feature information, and using the determined index value as an information collection result,
  • the target object is digitized with increased costs.
  • FIG. 1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a first embodiment of a remote controller searching method according to the present invention
  • FIG. 3 is a schematic flow chart of a second embodiment of a remote controller searching method according to the present invention.
  • FIG. 4 is a schematic flow chart of a third embodiment of a remote controller searching method according to the present invention.
  • FIG. 5 is a schematic flowchart diagram of a fourth embodiment of a remote controller searching method according to the present invention.
  • FIG. 6 is a schematic flowchart of a fifth embodiment of a remote controller searching method according to the present invention.
  • FIG. 7 is a schematic flowchart of a sixth embodiment of a remote controller searching method according to the present invention.
  • FIG. 8 is a schematic flowchart diagram of a seventh embodiment of a remote controller searching method according to the present invention.
  • FIG. 1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention.
  • the mobile terminal may include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • FIG. 1 does not constitute a limitation of the mobile terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • an operating system may be included in the memory 1005 as a computer storage medium.
  • a network communication module may be included in the memory 1005 as a computer storage medium.
  • a user interface module may be included in the memory 1005 as a computer storage medium.
  • the network interface 1004 is mainly used to connect to a server (the server may be a normal server or a cloud server, which is not limited in this embodiment), and performs data communication with the server;
  • the interface 1003 is mainly configured to receive an input instruction of the user; the mobile terminal invokes the information collection program stored in the memory 1005 through the processor 1001, and performs the following operations:
  • the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • the test area, the control area, and the background area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
  • the step of extracting the first feature information in the test area and extracting the second feature information in the control area is performed.
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • the type of the target object is a digital dial, determining a numerical area and a background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
  • the dial value is used as the information collection result.
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • the type of the target object is a digital dial, determining a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
  • the dial value and character content are used as information collection results.
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • the angle between the center line of the sector having the largest fourth gray level integral value and the horizontal direction is taken as the pointer deflection angle
  • the pointer value is used as the information collection result.
  • processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
  • the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  • the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified, and then the The first feature information in the test area is extracted, and the second feature information in the comparison area is extracted, and then the corresponding indicator value is determined according to the first feature information and the second feature information, and the determined indicator value is used as information collection.
  • the target object can be digitized without increasing the cost.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of an image acquisition method based on image recognition according to the present invention.
  • the image recognition based information collection method comprises the following steps:
  • the mobile terminal is a terminal device that can be used for mobile, for example, a device such as a smart phone, a tablet computer or a notebook computer, which is not limited in this embodiment.
  • the target object is an object that needs to be identified, and is usually an object that is difficult to digitize the detection result.
  • the image to be recognized is an image obtained by capturing a target object.
  • S20 determining, when the type of the target object is a test strip, a test area and a comparison area in the image to be recognized according to the first preset positioning identifier in the image to be identified;
  • the test strip usually has a test area and a control area.
  • a first preset positioning identifier may be preset on the test strip, thereby facilitating the waiting for the test strip. Determining the test area and the control area in the identification image, the first preset positioning identifier may be a positioning hole, or a locator having a distinct degree of discrimination, etc., of course, other identifiers may be used, which is not used in this embodiment. limit.
  • test area and the control area generally have feature information, and therefore, the first feature information in the test area can be extracted, and the second feature information in the control area can be extracted.
  • S40 Determine a corresponding indicator value according to the first feature information and the second feature information, and use the determined indicator value as the information collection result.
  • the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified, and then the test area is extracted.
  • First feature information, and extracting second feature information in the comparison area, and then determining a corresponding indicator value according to the first feature information and the second feature information, and using the determined indicator value as an information collection result The target object is digitized without increasing the cost.
  • the step S30 includes:
  • S301 Scan the test area to obtain a first gray level integral value in the test area, and use the first gray level integral value as the first feature information;
  • S302 Scan the control area to obtain a second gray level integral value in the control area, and use the second gray level integral value as the second feature information;
  • step S40 specifically includes:
  • S401 Calculate a ratio value between the first feature information and the second feature information, determine an index value corresponding to the calculated proportional value, and use the determined index value as the information collection result.
  • step S301 the test area may be scanned by using a preset rectangle.
  • step S302 the control area may be scanned by using a preset rectangle.
  • the image to be recognized may be subjected to gradation conversion in advance.
  • the test strip may have a detection result in the detection area, and also has a control information in the control area, for example, when the test strip is a pregnancy test strip, in the normal case, the test strip is detected.
  • a red line may appear in the area, and a red line may appear all the time in the control area.
  • the red line may not appear in the control area due to the test paper failure. Therefore, the test area may be scanned to obtain the first gray in the test area.
  • the first gray level integral value is used as the first feature information
  • the first feature information may reflect a red line occurrence of the detection area
  • the control area may also be scanned to obtain the
  • the second gray level integral value in the control area is used as the second feature information
  • the second feature information may reflect the occurrence of the red line in the control area.
  • the first feature information may reflect the occurrence of the red line of the detection area
  • the second feature information may reflect the occurrence of the red line of the control area. Therefore, calculating the ratio between the first feature information and the second feature information may determine the detection.
  • the correspondence between the proportional value and the index value may be established in advance, and the index value corresponding to the calculated proportional value is determined according to the correspondence relationship, and the determined index value is used as the index value. Information collection results.
  • the information collection result may be uploaded to a server, so that the server stores and analyzes the information collection result.
  • the step S30 includes:
  • S303 Scan the test area to obtain a first gray level integral value in the test area, and use the first gray level integral value as the first feature information;
  • step S40 specifically includes:
  • S402 Search for second feature information that matches the first feature information, determine an indicator value corresponding to the searched second feature information, and use the determined indicator value as the information collection result.
  • step S303 the test area can be scanned by using a preset rectangle.
  • the control area can be scanned by using a preset rectangle.
  • the image to be recognized may be subjected to gradation conversion in advance.
  • the test strip may have a detection result in the detection area, and at the same time, the control area has a plurality of colorimetric portions for comparison with the detection result, for example, a pH detection test paper, under normal circumstances,
  • the detection area of the PH value test strip may have a corresponding color, and the control area has various colors corresponding to different PH values (ie, a colorimetric part), and therefore, the test area may be scanned to obtain the test area.
  • the first gray level integral value is used as the first feature information, and the first feature information can reflect the color of the detection area, and can be based on the color difference between adjacent pixels.
  • the comparison area dividing the comparison area to obtain each colorimetric part in the comparison area, obtaining a second gray level integral value of each colorimetric part, and using the second gray level integral value as the second feature information, That is, the second feature information has a plurality of colors, and respectively reflects colors of the corresponding colorimetric portions;
  • the first feature information may reflect the color of the detection area, and the second feature information has a plurality of colors, and respectively reflect the color of the corresponding colorimetric portion. Therefore, the second feature information matching the first feature information may be searched for, and The second feature information can determine the detection result.
  • the correspondence between the position of each colorimetric portion and the index value can be established in advance, and can be determined according to the corresponding relationship. The index value corresponding to the second feature information is found, and the determined index value is used as the information collection result.
  • the information collection result may be uploaded to a server, so that the server stores and analyzes the information collection result.
  • FIG. 5 a fourth embodiment of the image recognition based image acquisition method of the present invention is proposed based on the second embodiment or the third embodiment.
  • FIG. 5 is based on the second embodiment.
  • step S20 specifically includes:
  • S201 determining, when the type of the target object is a test strip, a test area, a control area, and a background area in the image to be recognized according to the first preset positioning identifier in the image to be identified;
  • the method further includes:
  • S2003 Perform the step of extracting first feature information in the test area and extracting second feature information in the control area when the variance does not exceed a preset threshold.
  • the background area may be scanned left and right and up and down by using a preset rectangle to obtain a specific width ( ⁇ 1 mm) or a small rectangular gray integral value in the length, and calculate a third gray level integral value of each rectangle.
  • the variance when the variance exceeds the preset threshold, indicates that the current light is uneven, which may result in inaccurate detection results.
  • the user may be prompted to re-shoot, of course, when the variance does not exceed the preset threshold, Step S30, thereby further ensuring the accuracy of the detection result.
  • the fifth embodiment of the image recognition-based information collection method of the present invention is proposed based on the first embodiment.
  • the method further includes:
  • S211 determining, when the type of the target object is a digital dial, the numerical area and the background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
  • the digital dial also belongs to an object that is difficult to digitize, such as a weight scale.
  • the dial value of the digital dial can be read, and the weight scale can be conveniently recorded by directly scanning the weight scale. Grease and other values.
  • the digital dial usually has a numerical area and a background area.
  • a second preset positioning identifier may be preset on the digital dial, thereby facilitating the number.
  • the value area and the background area in the dial are determined.
  • the second preset positioning identifier may be a positioning hole, or a locator with a clear distinction, and of course, other identifiers may be used, which is not limited in this embodiment. .
  • the digital dial usually uses a 7-segment digital tube for digital display, and the area where the number is displayed is a numerical area. Since a plurality of numbers are usually displayed in the numerical area, the numerical area can be performed. Dividing, obtaining the digital parts in the numerical value area, performing gray scale comparison between each digital part and the background area, and obtaining the combination of the digital tube light and dark in each digital part, because the different light and dark combinations of the 7-segment digital tube respectively correspond to the number “0” ⁇ "9", so the correspondence between the number and the combination of light and dark can be set in advance, and the corresponding dial value is determined according to the digital tube light and dark combination and the corresponding relationship in each digital part.
  • the image to be recognized may be gray-scale transformed in advance.
  • the information collection result may be uploaded to a server, so that the server stores and analyzes the information collection result.
  • step S21 may further include:
  • S211 determining, when the type of the target object is a digital dial, a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
  • the method further includes:
  • the S25 specifically includes:
  • the dial value and character content are used as information collection results.
  • the dial feature map can be set on the server side.
  • the corresponding character content is determined according to the brightness and dark information of each pixel in the character area and the dial feature map.
  • the method further includes:
  • S221 When the type of the target object is a pointer dial, obtain a third preset positioning identifier and a center of the image to be recognized;
  • S222 Perform horizontal correction on the image to be identified by using the third preset positioning identifier and a center of the circle;
  • S223 Scan a horizontally corrected image to be recognized by using a preset fan shape around the center to obtain a fourth gray integrated value of each sector;
  • the pointer dial also belongs to an object that is difficult to digitize.
  • the pointer value of the pointer dial can be read.
  • the third preset positioning identifier may be a positioning hole, or a locator with a clear distinction, and of course, other identifiers may be used, which is not limited in this embodiment.
  • the digital dial in the to-be-identified image may not be in the horizontal direction, thereby affecting the detection result.
  • the third preset in the to-be-identified image may be obtained. Positioning the mark and the center of the circle, and correcting the image to be recognized by the third preset positioning mark and the center of the circle, and adopting a preset fan shape (the angle of the fan shape may be set to be less than or equal to 1 degree, and the radius is the center of the circle.
  • the distance to the locator is scanned around the center of the horizontally corrected image to be recognized, and the fourth gray integrated value of each sector is obtained. Since the pointer is usually dark, the fourth sector of the pointer is located.
  • the gray level integral value is usually the largest. Therefore, the angle between the center line of the sector with the largest fourth gray level integral value and the horizontal direction can be used as the pointer deflection angle, in order to facilitate determining the pointer corresponding to the pointer deflection angle.
  • a correspondence relationship between the deflection angle and the pointer value may be established in advance, and the corresponding pointer value is determined according to the pointer deflection angle and the correspondence relationship.
  • FIG. 8 a seventh embodiment of the image recognition based information collection method of the present invention is proposed based on any one of the first embodiment to the sixth embodiment.
  • FIG. 8 is based on the first embodiment.
  • the method before the step S10, the method further includes:
  • S01 Scan the code information bound to the target object, and obtain an object identification number and factory information in the graphic code information;
  • the code information may be a barcode or a two-dimensional code.
  • other graphic codes may be used. This embodiment does not limit this.
  • the object identification number and the factory information may be stored on the server side in advance.
  • the type of the target object and the measurement object may also be stored for the convenience of the user.
  • the server may determine the type of the target object according to the object identification number and the factory information, and feed back the type of the target object to the mobile terminal.
  • an embodiment of the present invention further provides a computer readable storage medium, where the information storage program is stored, and when the information collection program is executed by the processor, the following operations are implemented:
  • the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
  • the test area, the control area, and the background area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
  • the step of extracting the first feature information in the test area and extracting the second feature information in the control area is performed.
  • the type of the target object is a digital dial, determining a numerical area and a background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
  • the dial value is used as the information collection result.
  • the type of the target object is a digital dial, determining a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
  • the dial value and character content are used as information collection results.
  • the angle between the center line of the sector having the largest fourth gray level integral value and the horizontal direction is taken as the pointer deflection angle
  • the pointer value is used as the information collection result.
  • the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  • the embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course Hardware, but in many cases the former is a better implementation.
  • the technical solution of the present invention may be in the form of a software product in essence or in part contributing to the prior art.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk, light) as described above.
  • the disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

An image recognition based information collection method, a mobile terminal and a storage medium. The method comprises: if the type of a target object is a test strip, determining, according to a first preset positioning identifier of the image to be recognized, a test area and a control area of the image to be recognized (S20), extracting first feature information of the test area, and extracting second feature information of the control area (S30), then determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as an information collection result (S40). The present invention can digitize the target object without increasing cost.

Description

基于图像识别的信息采集方法、移动终端及存储介质  Information acquisition method based on image recognition, mobile terminal and storage medium
技术领域Technical field
本发明涉及物联网技术领域,尤其涉及一种基于图像识别的信息采集方法、移动终端及计算机可读存储介质。The present invention relates to the field of Internet of Things technologies, and in particular, to an image acquisition method based on image recognition, a mobile terminal, and a computer readable storage medium.
背景技术Background technique
物联网是新一代信息技术的重要组成部分,也是“信息化”时代的重要发展阶段。顾名思义,物联网就是物物相连的互联网。物联网通过智能感知、识别技术与普适计算等通信感知技术,广泛应用于网络的融合中,也因此被称为继计算机、互联网之后世界信息产业发展的第三次浪潮。The Internet of Things is an important part of the new generation of information technology and an important stage of development in the era of "informatization." As the name suggests, the Internet of Things is the Internet that connects things. The Internet of Things is widely used in the convergence of networks through communication-aware technologies such as intelligent sensing, identification technology and pervasive computing. It is also called the third wave of the development of the world information industry after computers and the Internet.
物联网领域的信息传输,多采用有线或无线网络进行数字化信息的传播,通常都需要安装特定的数字转化模块和通信模块,成本很高,但某些特定对象的检测结果难以进行数字化,例如:医学领域的各类检测试纸。Information transmission in the field of Internet of Things, mostly using wired or wireless networks for digital information dissemination, usually requires the installation of specific digital conversion modules and communication modules, which are costly, but the detection results of some specific objects are difficult to digitize, for example: Various test strips in the medical field.
述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The description is only for assisting in understanding the technical solutions of the present invention, and does not represent that the above is prior art.
发明内容Summary of the invention
本发明的主要目的在于提供一种基于图像识别的信息采集方法、移动终端及计算机可读存储介质,旨在解决现有技术中有些特定对象难以进行数字化的技术问题。The main object of the present invention is to provide an image acquisition method based on image recognition, a mobile terminal and a computer readable storage medium, which aim to solve the technical problem that some specific objects in the prior art are difficult to digitize.
为实现上述目的,本发明提供一种基于图像识别的信息采集方法,所述方法包括以下步骤:To achieve the above object, the present invention provides an image acquisition method based on image recognition, the method comprising the following steps:
获取目标对象的待识别图像;Obtaining an image to be identified of the target object;
在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;When the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;Extracting first feature information in the test area, and extracting second feature information in the control area;
根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。And determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as the information collection result.
此外,为实现上述目的,本发明还提供一种移动终端,所述移动终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的信息采集程序,所述信息采集程序配置为实现所述的基于图像识别的信息采集方法的步骤。In addition, in order to achieve the above object, the present invention further provides a mobile terminal, the mobile terminal comprising: a memory, a processor, and an information collecting program stored on the memory and operable on the processor, the information The acquisition program is configured to implement the steps of the image recognition based information collection method described.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有信息采集程序,所述信息采集程序被处理器执行时实现所述的基于图像识别的信息采集方法的步骤。Furthermore, in order to achieve the above object, the present invention also provides a computer readable storage medium having an information collection program stored thereon, the information acquisition program being implemented by a processor to implement the image recognition based The steps of the information collection method.
本发明可在目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区,再提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息,然后根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果,能够在不增加成本的情况下对目标对象进行数字化。The present invention may determine a test area and a control area in the image to be identified according to a first preset positioning identifier in the image to be identified when the type of the target object is a test strip, and then extract the first in the test area. a feature information, and extracting second feature information in the comparison area, and then determining a corresponding indicator value according to the first feature information and the second feature information, and using the determined index value as an information collection result, The target object is digitized with increased costs.
附图说明DRAWINGS
图1是本发明实施例方案涉及的硬件运行环境的移动终端结构示意图;1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention;
图2为本发明遥控器搜寻方法第一实施例的流程示意图;2 is a schematic flow chart of a first embodiment of a remote controller searching method according to the present invention;
图3为本发明遥控器搜寻方法第二实施例的流程示意图;3 is a schematic flow chart of a second embodiment of a remote controller searching method according to the present invention;
图4为本发明遥控器搜寻方法第三实施例的流程示意图;4 is a schematic flow chart of a third embodiment of a remote controller searching method according to the present invention;
图5为本发明遥控器搜寻方法第四实施例的流程示意图;FIG. 5 is a schematic flowchart diagram of a fourth embodiment of a remote controller searching method according to the present invention; FIG.
图6为本发明遥控器搜寻方法第五实施例的流程示意图;6 is a schematic flowchart of a fifth embodiment of a remote controller searching method according to the present invention;
图7为本发明遥控器搜寻方法第六实施例的流程示意图;7 is a schematic flowchart of a sixth embodiment of a remote controller searching method according to the present invention;
图8为本发明遥控器搜寻方法第七实施例的流程示意图。FIG. 8 is a schematic flowchart diagram of a seventh embodiment of a remote controller searching method according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
参照图1,图1为本发明实施例方案涉及的硬件运行环境的移动终端的结构示意图。1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention.
如图1所示,该移动终端可以包括:处理器1001,例如CPU,通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the mobile terminal may include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to implement connection communication between these components. The user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage. The memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图1中示出的结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 1 does not constitute a limitation of the mobile terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作***、网络通信模块、用户接口模块以及信息采集程序。As shown in FIG. 1, an operating system, a network communication module, a user interface module, and an information collection program may be included in the memory 1005 as a computer storage medium.
在图1所示的移动终端中,网络接口1004主要用于连接服务器(所述服务器可为普通服务器,也可为云服务器,本实施例对此不加以限制),与服务器进行数据通信;用户接口1003主要用于接收用户的输入指令;所述移动终端通过处理器1001调用存储器1005中存储的信息采集程序,并执行以下操作:In the mobile terminal shown in FIG. 1, the network interface 1004 is mainly used to connect to a server (the server may be a normal server or a cloud server, which is not limited in this embodiment), and performs data communication with the server; The interface 1003 is mainly configured to receive an input instruction of the user; the mobile terminal invokes the information collection program stored in the memory 1005 through the processor 1001, and performs the following operations:
获取目标对象的待识别图像;Obtaining an image to be identified of the target object;
在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;When the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;Extracting first feature information in the test area, and extracting second feature information in the control area;
根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。And determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as the information collection result.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;Scanning the test area to obtain a first gray level integral value in the test area, and using the first gray level integral value as the first feature information;
对所述对照区进行扫描,获得所述对照区中的第二灰度积分值,将所述第二灰度积分值作为所述第二特征信息;Scanning the control area to obtain a second gray level integral value in the control area, and using the second gray level integral value as the second feature information;
计算所述第一特征信息和第二特征信息之间的比例值,确定计算的比例值对应的指标数值,并将确定的指标数值作为信息采集结果。Calculating a ratio value between the first feature information and the second feature information, determining an index value corresponding to the calculated proportional value, and using the determined index value as the information collection result.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;Scanning the test area to obtain a first gray level integral value in the test area, and using the first gray level integral value as the first feature information;
根据相邻像素之间的色差对所述对照区进行划分,获得所述对照区中各比色部分,获得各比色部分的第二灰度积分值,并将所述第二灰度积分值作为所述第二特征信息;Dividing the comparison area according to a color difference between adjacent pixels, obtaining each colorimetric part in the comparison area, obtaining a second gray level integral value of each colorimetric part, and obtaining the second gray level integral value As the second feature information;
查找与所述第一特征信息匹配的第二特征信息,确定查找的第二特征信息对应的指标数值,并将确定的指标数值作为信息采集结果。And searching for the second feature information that matches the first feature information, determining the index value corresponding to the searched second feature information, and using the determined indicator value as the information collection result.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区、对照区和背景区;When the type of the target object is a test strip, the test area, the control area, and the background area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
采用预设矩形对所述背景区进行扫描,获得各矩形的第三灰度积分值;Scanning the background area by using a preset rectangle to obtain a third gray level integral value of each rectangle;
计算各矩形的第三灰度积分值之间的方差;Calculating a variance between the third gray level integral values of the respective rectangles;
在所述方差未超过预设阈值时,执行所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息的步骤。When the variance does not exceed the preset threshold, the step of extracting the first feature information in the test area and extracting the second feature information in the control area is performed.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区和背景区;When the type of the target object is a digital dial, determining a numerical area and a background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
对所述数值区进行划分,获得所述数值区中各数字部分;Dividing the numerical value area to obtain each digital part in the numerical value area;
对各数字部分与背景区进行灰度对比,获得各数字部分中数码管明暗组合;Performing gray scale comparison between each digital part and the background area to obtain a combination of digital tube light and dark in each digital part;
根据各数字部分中数码管明暗组合确定对应的表盘数值;Determining the corresponding dial value according to the combination of the digital tube light and dark in each digital part;
将所述表盘数值作为信息采集结果。The dial value is used as the information collection result.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区、背景区和字符区;When the type of the target object is a digital dial, determining a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
将所述字符区与背景区进行灰度对比,获得所述字符区中各像素点的明暗信息,根据所述字符区中各像素点的明暗信息及表盘特征分布图确定对应的字符内容;Performing gray scale comparison between the character area and the background area to obtain brightness and dark information of each pixel in the character area, and determining corresponding character content according to the brightness and dark information of each pixel point in the character area and the dial feature distribution map;
将所述表盘数值及字符内容作为信息采集结果。The dial value and character content are used as information collection results.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
在所述目标对象的类型为指针式表盘时,获得所述待识别图像中的第三预设定位标识及圆心;When the type of the target object is a pointer dial, obtain a third preset positioning identifier and a center of the image to be recognized;
通过所述第三预设定位标识及圆心将所述待识别图像进行水平校正;Level-correcting the image to be recognized by the third preset positioning identifier and the center of the circle;
采用预设扇形绕所述圆心对水平校正后的待识别图像进行扫描,获得各扇形的第四灰度积分值;Scanning the horizontally corrected image to be recognized by using a preset fan shape around the center of the circle to obtain a fourth gray level integral value of each sector shape;
将第四灰度积分值最大的扇形的中分线与水平方向之间的夹角作为指针偏转角度;The angle between the center line of the sector having the largest fourth gray level integral value and the horizontal direction is taken as the pointer deflection angle;
根据所述指针偏转角度确定对应的指针数值;Determining a corresponding pointer value according to the pointer deflection angle;
将所述指针数值作为信息采集结果。The pointer value is used as the information collection result.
进一步地,处理器1001可以调用存储器1005中存储的信息采集程序,还执行以下操作:Further, the processor 1001 can call the information collection program stored in the memory 1005, and also perform the following operations:
扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
本实施例通过上述方案,可在目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区,再提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息,然后根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果,能够在不增加成本的情况下对目标对象进行数字化。In the above embodiment, when the type of the target object is the test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified, and then the The first feature information in the test area is extracted, and the second feature information in the comparison area is extracted, and then the corresponding indicator value is determined according to the first feature information and the second feature information, and the determined indicator value is used as information collection. As a result, the target object can be digitized without increasing the cost.
基于上述硬件结构,提出本发明基于图像识别的信息采集方法实施例。Based on the above hardware structure, an embodiment of the image acquisition method based on image recognition of the present invention is proposed.
参照图2,图2为本发明基于图像识别的信息采集方法第一实施例的流程示意图。Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of a first embodiment of an image acquisition method based on image recognition according to the present invention.
在第一实施例中,所述基于图像识别的信息采集方法包括以下步骤:In a first embodiment, the image recognition based information collection method comprises the following steps:
S10:获取目标对象的待识别图像;S10: acquiring an image to be identified of the target object;
应理解的是,所述移动终端为可用于移动的终端设备,例如:智能手机、平板电脑或笔记本电脑等设备,本实施例对此不加以限制。It should be understood that the mobile terminal is a terminal device that can be used for mobile, for example, a device such as a smart phone, a tablet computer or a notebook computer, which is not limited in this embodiment.
需要说明的是,所述目标对象即为需要进行识别的对象,其通常为检测结果较难进行数字化的对象。It should be noted that the target object is an object that needs to be identified, and is usually an object that is difficult to digitize the detection result.
可理解的是,所述待识别图像即为对目标对象进行拍摄所获得的图像。It can be understood that the image to be recognized is an image obtained by capturing a target object.
S20:在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;S20: determining, when the type of the target object is a test strip, a test area and a comparison area in the image to be recognized according to the first preset positioning identifier in the image to be identified;
在具体实现中,所述检测试纸中通常具有测试区和对照区,为了对测试区和对照区进行区别,可在所述检测试纸上预先设置第一预设定位标识,从而便于对所述待识别图像中的测试区和对照区进行确定,所述第一预设定位标识可为定位孔、或有明显区分度的定位符等,当然,还可为其他标识,本实施例对此不加以限制。In a specific implementation, the test strip usually has a test area and a control area. In order to distinguish between the test area and the control area, a first preset positioning identifier may be preset on the test strip, thereby facilitating the waiting for the test strip. Determining the test area and the control area in the identification image, the first preset positioning identifier may be a positioning hole, or a locator having a distinct degree of discrimination, etc., of course, other identifiers may be used, which is not used in this embodiment. limit.
S30:提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;S30: extract first feature information in the test area, and extract second feature information in the control area;
可理解的是,所述测试区和对照区中通常都具有特征信息,因此,可提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息。It can be understood that the test area and the control area generally have feature information, and therefore, the first feature information in the test area can be extracted, and the second feature information in the control area can be extracted.
S40:根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。S40: Determine a corresponding indicator value according to the first feature information and the second feature information, and use the determined indicator value as the information collection result.
本实施例可在目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区,再提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息,然后根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果,能够在不增加成本的情况下对目标对象进行数字化。In this embodiment, when the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified, and then the test area is extracted. First feature information, and extracting second feature information in the comparison area, and then determining a corresponding indicator value according to the first feature information and the second feature information, and using the determined indicator value as an information collection result, The target object is digitized without increasing the cost.
进一步地,如图3所示,基于第一实施例提出本发明基于图像识别的信息采集方法第二实施例,在本实施例中,步骤S30,具体包括:Further, as shown in FIG. 3, a second embodiment of the image recognition-based information collection method of the present invention is proposed based on the first embodiment. In this embodiment, the step S30 includes:
S301:对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;S301: Scan the test area to obtain a first gray level integral value in the test area, and use the first gray level integral value as the first feature information;
S302:对所述对照区进行扫描,获得所述对照区中的第二灰度积分值,将所述第二灰度积分值作为所述第二特征信息;S302: Scan the control area to obtain a second gray level integral value in the control area, and use the second gray level integral value as the second feature information;
相应地,步骤S40,具体包括:Correspondingly, step S40 specifically includes:
S401:计算所述第一特征信息和第二特征信息之间的比例值,确定计算的比例值对应的指标数值,并将确定的指标数值作为信息采集结果。S401: Calculate a ratio value between the first feature information and the second feature information, determine an index value corresponding to the calculated proportional value, and use the determined index value as the information collection result.
可理解的是,在步骤S301中,可采用预设矩形对所述测试区进行扫描,步骤S302中,可采用预设矩形对所述对照区进行扫描,当然,为便于获得灰度积分值,可预先将所述待识别图像进行灰度转换。It can be understood that, in step S301, the test area may be scanned by using a preset rectangle. In step S302, the control area may be scanned by using a preset rectangle. Of course, in order to obtain the gray integral value, The image to be recognized may be subjected to gradation conversion in advance.
在具体实现中,所述检测试纸可能在检测区中具有检测结果,同时在对照区也具有一个对照信息,例如:检测试纸为验孕试纸时,在通常情况下,所述验孕试纸的检测区可能出现红线,所述对照区会一直出现红线,当然,在对照区也可能由于试纸失效而不出现红线,因此,可对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息,所述第一特征信息即可反映检测区的红线出现情况,也可对所述对照区进行扫描,获得所述对照区中的第二灰度积分值,将所述第二灰度积分值作为所述第二特征信息,所述第二特征信息即可反映对照区的红线出现情况。In a specific implementation, the test strip may have a detection result in the detection area, and also has a control information in the control area, for example, when the test strip is a pregnancy test strip, in the normal case, the test strip is detected. A red line may appear in the area, and a red line may appear all the time in the control area. Of course, the red line may not appear in the control area due to the test paper failure. Therefore, the test area may be scanned to obtain the first gray in the test area. a degree integral value, the first gray level integral value is used as the first feature information, the first feature information may reflect a red line occurrence of the detection area, and the control area may also be scanned to obtain the The second gray level integral value in the control area is used as the second feature information, and the second feature information may reflect the occurrence of the red line in the control area.
由于第一特征信息可反映检测区的红线出现情况,第二特征信息可反映对照区的红线出现情况,因此,计算所述第一特征信息和第二特征信息之间的比例值即可确定检测结果,为便于确定计算的比例值对应的指标数值,可预先建立比例值与指标数值之间的对应关系,并根据对应关系来确定计算的比例值对应的指标数值,并将确定的指标数值作为信息采集结果。The first feature information may reflect the occurrence of the red line of the detection area, and the second feature information may reflect the occurrence of the red line of the control area. Therefore, calculating the ratio between the first feature information and the second feature information may determine the detection. As a result, in order to facilitate determining the index value corresponding to the calculated proportional value, the correspondence between the proportional value and the index value may be established in advance, and the index value corresponding to the calculated proportional value is determined according to the correspondence relationship, and the determined index value is used as the index value. Information collection results.
在获得所述信息采集结果后,可将所述信息采集结果上传至服务器,以便于服务器对所述信息采集结果进行存储及分析。After obtaining the information collection result, the information collection result may be uploaded to a server, so that the server stores and analyzes the information collection result.
进一步地,如图4所示,基于第一实施例提出本发明基于图像识别的信息采集方法第三实施例,在本实施例中,步骤S30,具体包括:Further, as shown in FIG. 4, a third embodiment of the image recognition-based information collection method of the present invention is proposed based on the first embodiment. In this embodiment, the step S30 includes:
S303:对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;S303: Scan the test area to obtain a first gray level integral value in the test area, and use the first gray level integral value as the first feature information;
S304:根据相邻像素之间的色差对所述对照区进行划分,获得所述对照区中各比色部分,获得各比色部分的第二灰度积分值,并将所述第二灰度积分值作为所述第二特征信息;S304: dividing the comparison area according to a color difference between adjacent pixels, obtaining each colorimetric part in the comparison area, obtaining a second gray level integral value of each colorimetric part, and obtaining the second gray level An integral value as the second feature information;
相应地,步骤S40,具体包括:Correspondingly, step S40 specifically includes:
S402:查找与所述第一特征信息匹配的第二特征信息,确定查找的第二特征信息对应的指标数值,并将确定的指标数值作为信息采集结果。S402: Search for second feature information that matches the first feature information, determine an indicator value corresponding to the searched second feature information, and use the determined indicator value as the information collection result.
可理解的是,在步骤S303中,可采用预设矩形对所述测试区进行扫描,步骤S303中,可采用预设矩形对所述对照区进行扫描,当然,为便于获得灰度积分值,可预先将所述待识别图像进行灰度转换。It can be understood that, in step S303, the test area can be scanned by using a preset rectangle. In step S303, the control area can be scanned by using a preset rectangle. Of course, in order to obtain the gray integral value, The image to be recognized may be subjected to gradation conversion in advance.
在具体实现中,所述检测试纸可能在检测区中具有检测结果,同时在对照区具有多个用于与检测结果进行对比的比色部分,例如:PH值检测试纸,在通常情况下,所述PH值检测试纸的检测区可能出现对应的颜色,所述对照区具有不同PH值对应的各种颜色(即比色部分),因此,可对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息,所述第一特征信息即可反映检测区的颜色,可根据相邻像素之间的色差对所述对照区进行划分,获得所述对照区中各比色部分,获得各比色部分的第二灰度积分值,并将所述第二灰度积分值作为所述第二特征信息,也就是说,所述第二特征信息具有多个,且分别反映对应比色部分的颜色;In a specific implementation, the test strip may have a detection result in the detection area, and at the same time, the control area has a plurality of colorimetric portions for comparison with the detection result, for example, a pH detection test paper, under normal circumstances, The detection area of the PH value test strip may have a corresponding color, and the control area has various colors corresponding to different PH values (ie, a colorimetric part), and therefore, the test area may be scanned to obtain the test area. The first gray level integral value is used as the first feature information, and the first feature information can reflect the color of the detection area, and can be based on the color difference between adjacent pixels. And dividing the comparison area to obtain each colorimetric part in the comparison area, obtaining a second gray level integral value of each colorimetric part, and using the second gray level integral value as the second feature information, That is, the second feature information has a plurality of colors, and respectively reflects colors of the corresponding colorimetric portions;
由于第一特征信息可反映检测区的颜色,第二特征信息具有多个,且分别反映对应比色部分的颜色,因此,可查找与所述第一特征信息匹配的第二特征信息,查找到的第二特征信息即可确定检测结果,为便于确定查找的第二特征信息对应的指标数值,可预先建立各比色部分的位置与指标数值之间的对应关系,可根据所述对应关系确定查找的第二特征信息对应的指标数值,并将确定的指标数值作为信息采集结果。The first feature information may reflect the color of the detection area, and the second feature information has a plurality of colors, and respectively reflect the color of the corresponding colorimetric portion. Therefore, the second feature information matching the first feature information may be searched for, and The second feature information can determine the detection result. To facilitate determining the index value corresponding to the searched second feature information, the correspondence between the position of each colorimetric portion and the index value can be established in advance, and can be determined according to the corresponding relationship. The index value corresponding to the second feature information is found, and the determined index value is used as the information collection result.
在获得所述信息采集结果后,可将所述信息采集结果上传至服务器,以便于服务器对所述信息采集结果进行存储及分析。After obtaining the information collection result, the information collection result may be uploaded to a server, so that the server stores and analyzes the information collection result.
进一步地,如图5所示,基于第二实施例或第三实施例提出本发明基于图像识别的信息采集方法第四实施例,图5以基于第二实施例为例。Further, as shown in FIG. 5, a fourth embodiment of the image recognition based image acquisition method of the present invention is proposed based on the second embodiment or the third embodiment. FIG. 5 is based on the second embodiment.
在本实施例中,步骤S20,具体包括:In this embodiment, step S20 specifically includes:
S201:在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区、对照区和背景区;S201: determining, when the type of the target object is a test strip, a test area, a control area, and a background area in the image to be recognized according to the first preset positioning identifier in the image to be identified;
步骤S30之前,所述方法还包括:Before the step S30, the method further includes:
S2001:采用预设矩形对所述背景区进行扫描,获得各矩形的第三灰度积分值;S2001: scanning the background area by using a preset rectangle to obtain a third gray level integral value of each rectangle;
S2002:计算各矩形的第三灰度积分值之间的方差;S2002: calculating a variance between the third gray level integral values of each rectangle;
S2003:在所述方差未超过预设阈值时,执行所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息的步骤。S2003: Perform the step of extracting first feature information in the test area and extracting second feature information in the control area when the variance does not exceed a preset threshold.
在步骤S211中,可采用预设矩形对所述背景区进行左右及上下扫描,获取特定宽度(≤1mm)或长度内小矩形灰度积分值,计算各矩形的第三灰度积分值之间的方差,在所述方差超过预设阈值时,说明当前光线不均匀,会导致检测结果不准确,此时,可提示用户需要重新拍摄,当然,在所述方差未超过预设阈值时,执行步骤S30,从而进一步保证了检测结果的准确性。In step S211, the background area may be scanned left and right and up and down by using a preset rectangle to obtain a specific width (≤1 mm) or a small rectangular gray integral value in the length, and calculate a third gray level integral value of each rectangle. The variance, when the variance exceeds the preset threshold, indicates that the current light is uneven, which may result in inaccurate detection results. At this time, the user may be prompted to re-shoot, of course, when the variance does not exceed the preset threshold, Step S30, thereby further ensuring the accuracy of the detection result.
进一步地,如图6所示,基于第一实施例提出本发明基于图像识别的信息采集方法第五实施例,在本实施例中,步骤S10之后,所述方法还包括:Further, as shown in FIG. 6, the fifth embodiment of the image recognition-based information collection method of the present invention is proposed based on the first embodiment. In this embodiment, after the step S10, the method further includes:
S211:在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区和背景区;S211: determining, when the type of the target object is a digital dial, the numerical area and the background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
S212:对所述数值区进行划分,获得所述数值区中各数字部分;S212: Dividing the numerical value area to obtain each digital part in the numerical value area;
S213:对各数字部分与背景区进行灰度对比,获得各数字部分中数码管明暗组合;S213: performing gray scale comparison on each digital part and the background area to obtain a combination of digital tube light and dark in each digital part;
S214:根据各数字部分中数码管明暗组合确定对应的表盘数值;S214: Determine a corresponding dial value according to a digital tube light and dark combination in each digital part;
S215:将所述表盘数值作为信息采集结果。S215: The dial value is used as the information collection result.
应理解的是,所述数字表盘也属于较难数值化的对象,例如体重秤,本实施例可对所述数字表盘的表盘数值进行读取,直接扫描体重秤即可方便的记录体重、体脂等数值。It should be understood that the digital dial also belongs to an object that is difficult to digitize, such as a weight scale. In this embodiment, the dial value of the digital dial can be read, and the weight scale can be conveniently recorded by directly scanning the weight scale. Grease and other values.
在具体实现中,所述数字表盘中通常具有数值区和背景区,为了对数值区和背景区进行区别,可在所述数字表盘上预先设置第二预设定位标识,从而便于对所述数字表盘中的数值区和背景区进行确定,所述第二预设定位标识可为定位孔、或有明显区分度的定位符等,当然,还可为其他标识,本实施例对此不加以限制。In a specific implementation, the digital dial usually has a numerical area and a background area. In order to distinguish between the numerical area and the background area, a second preset positioning identifier may be preset on the digital dial, thereby facilitating the number. The value area and the background area in the dial are determined. The second preset positioning identifier may be a positioning hole, or a locator with a clear distinction, and of course, other identifiers may be used, which is not limited in this embodiment. .
需要说明的是,所述数字表盘通常是采用7段数码管进行数字的显示,显示数字的区域即为数值区,由于数值区中通常会显示多个数字,因此,可对所述数值区进行划分,获得所述数值区中各数字部分,对各数字部分与背景区进行灰度对比,获得各数字部分中数码管明暗组合,由于7段数码管的不同明暗组合分别对应数字“0”~“9”,因此可预先设置数字与明暗组合之间的对应关系,根据各数字部分中数码管明暗组合及所述对应关系确定对应的表盘数值。It should be noted that the digital dial usually uses a 7-segment digital tube for digital display, and the area where the number is displayed is a numerical area. Since a plurality of numbers are usually displayed in the numerical area, the numerical area can be performed. Dividing, obtaining the digital parts in the numerical value area, performing gray scale comparison between each digital part and the background area, and obtaining the combination of the digital tube light and dark in each digital part, because the different light and dark combinations of the 7-segment digital tube respectively correspond to the number “0”~ "9", so the correspondence between the number and the combination of light and dark can be set in advance, and the corresponding dial value is determined according to the digital tube light and dark combination and the corresponding relationship in each digital part.
为便于对各数字部分与背景区进行灰度对比,可预先对所述待识别图像进行灰度变换。In order to facilitate gray scale comparison between each digital part and the background area, the image to be recognized may be gray-scale transformed in advance.
在获得所述信息采集结果后,可将所述信息采集结果上传至服务器,以便于服务器对所述信息采集结果进行存储及分析。After obtaining the information collection result, the information collection result may be uploaded to a server, so that the server stores and analyzes the information collection result.
需要说明的是,所述数字表盘通常还会设置用于表征数值单位或运行状态等数据的字符,为便于对所述字符进行识别,本实施例中,步骤S21,还可具体包括:It should be noted that, in the digital dial, a character for characterizing a numerical unit or an operating state is also set. In order to facilitate the identification of the character, in the embodiment, step S21 may further include:
S211:在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区、背景区和字符区;S211: determining, when the type of the target object is a digital dial, a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
相应地,所述S25之前,所述方法还包括:Correspondingly, before the S25, the method further includes:
将所述字符区与背景区进行灰度对比,获得所述字符区中各像素点的明暗信息,根据所述字符区中各像素点的明暗信息及表盘特征分布图确定对应的字符内容;Performing gray scale comparison between the character area and the background area to obtain brightness and dark information of each pixel in the character area, and determining corresponding character content according to the brightness and dark information of each pixel point in the character area and the dial feature distribution map;
相应地,所述S25,具体包括:Correspondingly, the S25 specifically includes:
将所述表盘数值及字符内容作为信息采集结果。The dial value and character content are used as information collection results.
可理解的是,所述表盘特征分布图可设置于服务器侧,在需要进行字符内容确定时,根据所述字符区中各像素点的明暗信息及表盘特征分布图确定对应的字符内容。It can be understood that the dial feature map can be set on the server side. When character content determination is required, the corresponding character content is determined according to the brightness and dark information of each pixel in the character area and the dial feature map.
进一步地,如图7所示,基于第一实施例提出本发明基于图像识别的信息采集方法第六实施例,在本实施例中,步骤S10之后,所述方法还包括:Further, as shown in FIG. 7 , a sixth embodiment of the image recognition-based information collection method of the present invention is proposed based on the first embodiment. In this embodiment, after the step S10, the method further includes:
S221:在所述目标对象的类型为指针式表盘时,获得所述待识别图像中的第三预设定位标识及圆心;S221: When the type of the target object is a pointer dial, obtain a third preset positioning identifier and a center of the image to be recognized;
S222:通过所述第三预设定位标识及圆心将所述待识别图像进行水平校正;S222: Perform horizontal correction on the image to be identified by using the third preset positioning identifier and a center of the circle;
S223:采用预设扇形绕所述圆心对水平校正后的待识别图像进行扫描,获得各扇形的第四灰度积分值;S223: Scan a horizontally corrected image to be recognized by using a preset fan shape around the center to obtain a fourth gray integrated value of each sector;
S224:将第四灰度积分值最大的扇形的中分线与水平方向之间的夹角作为指针偏转角度;S224: taking an angle between a center line of the sector having the largest fourth gray level integral value and a horizontal direction as a pointer deflection angle;
S225:根据所述指针偏转角度确定对应的指针数值;S225: Determine a corresponding pointer value according to the pointer deflection angle;
S226:将所述指针数值作为信息采集结果。S226: The pointer value is used as the information collection result.
应理解的是,所述指针式表盘也属于较难数值化的对象,本实施例可对所述指针式表盘的指针数值进行读取。It should be understood that the pointer dial also belongs to an object that is difficult to digitize. In this embodiment, the pointer value of the pointer dial can be read.
可理解的是,所述第三预设定位标识可为定位孔、或有明显区分度的定位符等,当然,还可为其他标识,本实施例对此不加以限制。It can be understood that the third preset positioning identifier may be a positioning hole, or a locator with a clear distinction, and of course, other identifiers may be used, which is not limited in this embodiment.
在具体实现中,所述待识别图像中的数字表盘容易不符合水平方向,从而影响检测结果,为保证所述检测结果,本实施例中,可获得所述待识别图像中的第三预设定位标识及圆心,通过所述第三预设定位标识及圆心将所述待识别图像进行水平校正,采用预设扇形(所述扇形的夹角可设置为小于等于1度,半径为所述圆心至定位符之间的距离)绕所述圆心对水平校正后的待识别图像进行扫描,获得各扇形的第四灰度积分值,由于指针通常为深色,因此,指针所在的扇形的第四灰度积分值通常会最大,因此,可将第四灰度积分值最大的扇形的中分线与水平方向之间的夹角作为指针偏转角度,为便于确定与所述指针偏转角度对应的指针数值,可预先建立偏转角度与指针数值之间的对应关系,根据所述指针偏转角度以及所述对应关系确定对应的指针数值。In a specific implementation, the digital dial in the to-be-identified image may not be in the horizontal direction, thereby affecting the detection result. To ensure the detection result, in this embodiment, the third preset in the to-be-identified image may be obtained. Positioning the mark and the center of the circle, and correcting the image to be recognized by the third preset positioning mark and the center of the circle, and adopting a preset fan shape (the angle of the fan shape may be set to be less than or equal to 1 degree, and the radius is the center of the circle The distance to the locator is scanned around the center of the horizontally corrected image to be recognized, and the fourth gray integrated value of each sector is obtained. Since the pointer is usually dark, the fourth sector of the pointer is located. The gray level integral value is usually the largest. Therefore, the angle between the center line of the sector with the largest fourth gray level integral value and the horizontal direction can be used as the pointer deflection angle, in order to facilitate determining the pointer corresponding to the pointer deflection angle. For the numerical value, a correspondence relationship between the deflection angle and the pointer value may be established in advance, and the corresponding pointer value is determined according to the pointer deflection angle and the correspondence relationship.
进一步地,如图8所示,基于第一实施例~第六实施例的任一项提出本发明基于图像识别的信息采集方法第七实施例,图8以基于第一实施例为例,在本实施例中,步骤S10之前,所述方法还包括:Further, as shown in FIG. 8 , a seventh embodiment of the image recognition based information collection method of the present invention is proposed based on any one of the first embodiment to the sixth embodiment. FIG. 8 is based on the first embodiment. In this embodiment, before the step S10, the method further includes:
S01:扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;S01: Scan the code information bound to the target object, and obtain an object identification number and factory information in the graphic code information;
S02:对所述对象标识号及出厂信息进行验证;S02: verify the object identification number and the factory information;
S03:在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。S03: When the verification is passed, determining the type of the target object according to the object identification number and the factory information, and performing the step of acquiring the image to be recognized of the target object.
在具体实现中,所述图码信息可为条形码或二维码,当然,还可为其他图码,本实施例对此不加以限制。In a specific implementation, the code information may be a barcode or a two-dimensional code. Of course, other graphic codes may be used. This embodiment does not limit this.
可理解的是,为便于对所述对象标识号及出厂信息进行验证,可预先在服务器侧存储对象标识号及出厂信息,当然,为便于用户查询,还可存储目标对象的类型和测量对象。It can be understood that, in order to facilitate verification of the object identification number and the factory information, the object identification number and the factory information may be stored on the server side in advance. Of course, the type of the target object and the measurement object may also be stored for the convenience of the user.
在验证通过时,可进行后续步骤,为了便于确定目标对象的类型,可由服务器根据所述对象标识号及出厂信息确定所述目标对象的类型,并将所述目标对象的类型反馈至移动终端。When the verification is passed, a subsequent step may be performed. To facilitate determining the type of the target object, the server may determine the type of the target object according to the object identification number and the factory information, and feed back the type of the target object to the mobile terminal.
此外,本发明实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有信息采集程序,所述信息采集程序被处理器执行时实现如下操作:In addition, an embodiment of the present invention further provides a computer readable storage medium, where the information storage program is stored, and when the information collection program is executed by the processor, the following operations are implemented:
获取目标对象的待识别图像;Obtaining an image to be identified of the target object;
在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;When the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;Extracting first feature information in the test area, and extracting second feature information in the control area;
根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。And determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as the information collection result.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;Scanning the test area to obtain a first gray level integral value in the test area, and using the first gray level integral value as the first feature information;
对所述对照区进行扫描,获得所述对照区中的第二灰度积分值,将所述第二灰度积分值作为所述第二特征信息;Scanning the control area to obtain a second gray level integral value in the control area, and using the second gray level integral value as the second feature information;
计算所述第一特征信息和第二特征信息之间的比例值,确定计算的比例值对应的指标数值,并将确定的指标数值作为信息采集结果。Calculating a ratio value between the first feature information and the second feature information, determining an index value corresponding to the calculated proportional value, and using the determined index value as the information collection result.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;Scanning the test area to obtain a first gray level integral value in the test area, and using the first gray level integral value as the first feature information;
根据相邻像素之间的色差对所述对照区进行划分,获得所述对照区中各比色部分,获得各比色部分的第二灰度积分值,并将所述第二灰度积分值作为所述第二特征信息;Dividing the comparison area according to a color difference between adjacent pixels, obtaining each colorimetric part in the comparison area, obtaining a second gray level integral value of each colorimetric part, and obtaining the second gray level integral value As the second feature information;
查找与所述第一特征信息匹配的第二特征信息,确定查找的第二特征信息对应的指标数值,并将确定的指标数值作为信息采集结果。And searching for the second feature information that matches the first feature information, determining the index value corresponding to the searched second feature information, and using the determined indicator value as the information collection result.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区、对照区和背景区;When the type of the target object is a test strip, the test area, the control area, and the background area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
采用预设矩形对所述背景区进行扫描,获得各矩形的第三灰度积分值;Scanning the background area by using a preset rectangle to obtain a third gray level integral value of each rectangle;
计算各矩形的第三灰度积分值之间的方差;Calculating a variance between the third gray level integral values of the respective rectangles;
在所述方差未超过预设阈值时,执行所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息的步骤。When the variance does not exceed the preset threshold, the step of extracting the first feature information in the test area and extracting the second feature information in the control area is performed.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区和背景区;When the type of the target object is a digital dial, determining a numerical area and a background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
对所述数值区进行划分,获得所述数值区中各数字部分;Dividing the numerical value area to obtain each digital part in the numerical value area;
对各数字部分与背景区进行灰度对比,获得各数字部分中数码管明暗组合;Performing gray scale comparison between each digital part and the background area to obtain a combination of digital tube light and dark in each digital part;
根据各数字部分中数码管明暗组合确定对应的表盘数值;Determining the corresponding dial value according to the combination of the digital tube light and dark in each digital part;
将所述表盘数值作为信息采集结果。The dial value is used as the information collection result.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区、背景区和字符区;When the type of the target object is a digital dial, determining a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
将所述字符区与背景区进行灰度对比,获得所述字符区中各像素点的明暗信息,根据所述字符区中各像素点的明暗信息及表盘特征分布图确定对应的字符内容;Performing gray scale comparison between the character area and the background area to obtain brightness and dark information of each pixel in the character area, and determining corresponding character content according to the brightness and dark information of each pixel point in the character area and the dial feature distribution map;
将所述表盘数值及字符内容作为信息采集结果。The dial value and character content are used as information collection results.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
在所述目标对象的类型为指针式表盘时,获得所述待识别图像中的第三预设定位标识及圆心;When the type of the target object is a pointer dial, obtain a third preset positioning identifier and a center of the image to be recognized;
通过所述第三预设定位标识及圆心将所述待识别图像进行水平校正;Level-correcting the image to be recognized by the third preset positioning identifier and the center of the circle;
采用预设扇形绕所述圆心对水平校正后的待识别图像进行扫描,获得各扇形的第四灰度积分值;Scanning the horizontally corrected image to be recognized by using a preset fan shape around the center of the circle to obtain a fourth gray level integral value of each sector shape;
将第四灰度积分值最大的扇形的中分线与水平方向之间的夹角作为指针偏转角度;The angle between the center line of the sector having the largest fourth gray level integral value and the horizontal direction is taken as the pointer deflection angle;
根据所述指针偏转角度确定对应的指针数值;Determining a corresponding pointer value according to the pointer deflection angle;
将所述指针数值作为信息采集结果。The pointer value is used as the information collection result.
进一步地,所述信息采集程序被处理器执行时还实现如下操作:Further, when the information collection program is executed by the processor, the following operations are also implemented:
扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还 包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、 方法、物品或者***中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or Also includes other elements not explicitly listed, or Includes elements inherent to such a process, method, item, or system. In the absence of more restrictions, an element defined by the phrase "including one..." is not excluded from the process of including the element, There are additional identical elements in the method, item or system.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述 实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体 现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光 盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Those skilled in the art can clearly understand the above by the description of the above embodiments. The embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course Hardware, but in many cases the former is a better implementation. Based on such understanding, the technical solution of the present invention may be in the form of a software product in essence or in part contributing to the prior art. It is now apparent that the computer software product is stored in a storage medium (such as ROM/RAM, disk, light) as described above. The disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (16)

  1. 一种基于图像识别的信息采集方法,其特征在于,所述方法包括以下步骤: An image recognition based information collection method, characterized in that the method comprises the following steps:
    获取目标对象的待识别图像;Obtaining an image to be identified of the target object;
    在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;When the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
    提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;Extracting first feature information in the test area, and extracting second feature information in the control area;
    根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。And determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as the information collection result.
  2. 如权利要求1所述的方法,其特征在于,所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息,具体包括:The method of claim 1, wherein the extracting the first feature information in the test area and extracting the second feature information in the control area comprises:
    对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;Scanning the test area to obtain a first gray level integral value in the test area, and using the first gray level integral value as the first feature information;
    对所述对照区进行扫描,获得所述对照区中的第二灰度积分值,将所述第二灰度积分值作为所述第二特征信息;Scanning the control area to obtain a second gray level integral value in the control area, and using the second gray level integral value as the second feature information;
    相应地,所述根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果,具体包括:Correspondingly, the determining the corresponding indicator value according to the first feature information and the second feature information, and using the determined indicator value as the information collection result, specifically includes:
    计算所述第一特征信息和第二特征信息之间的比例值,确定计算的比例值对应的指标数值,并将确定的指标数值作为信息采集结果。Calculating a ratio value between the first feature information and the second feature information, determining an index value corresponding to the calculated proportional value, and using the determined index value as the information collection result.
  3. 如权利要求1所述的方法,其特征在于,所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息,具体包括:The method of claim 1, wherein the extracting the first feature information in the test area and extracting the second feature information in the control area comprises:
    对所述测试区进行扫描,获得所述测试区中的第一灰度积分值,将所述第一灰度积分值作为所述第一特征信息;Scanning the test area to obtain a first gray level integral value in the test area, and using the first gray level integral value as the first feature information;
    根据相邻像素之间的色差对所述对照区进行划分,获得所述对照区中各比色部分,获得各比色部分的第二灰度积分值,并将所述第二灰度积分值作为所述第二特征信息;Dividing the comparison area according to a color difference between adjacent pixels, obtaining each colorimetric part in the comparison area, obtaining a second gray level integral value of each colorimetric part, and obtaining the second gray level integral value As the second feature information;
    相应地,所述根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果,具体包括:Correspondingly, the determining the corresponding indicator value according to the first feature information and the second feature information, and using the determined indicator value as the information collection result, specifically includes:
    查找与所述第一特征信息匹配的第二特征信息,确定查找的第二特征信息对应的指标数值,并将确定的指标数值作为信息采集结果。And searching for the second feature information that matches the first feature information, determining the index value corresponding to the searched second feature information, and using the determined indicator value as the information collection result.
  4. 如权利要求2所述的方法,其特征在于,所述在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区,具体包括:The method according to claim 2, wherein when the type of the target object is a test strip, the test in the image to be recognized is determined according to the first preset positioning identifier in the image to be recognized. District and control area, including:
    在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区、对照区和背景区;When the type of the target object is a test strip, the test area, the control area, and the background area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
    相应地,所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息之前,所述方法还包括:Correspondingly, before the extracting the first feature information in the test area and extracting the second feature information in the control area, the method further includes:
    采用预设矩形对所述背景区进行扫描,获得各矩形的第三灰度积分值;Scanning the background area by using a preset rectangle to obtain a third gray level integral value of each rectangle;
    计算各矩形的第三灰度积分值之间的方差;Calculating a variance between the third gray level integral values of the respective rectangles;
    在所述方差未超过预设阈值时,执行所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息的步骤。When the variance does not exceed the preset threshold, the step of extracting the first feature information in the test area and extracting the second feature information in the control area is performed.
  5. 如权利要求3所述的方法,其特征在于,所述在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区,具体包括:The method according to claim 3, wherein when the type of the target object is a test strip, the test in the image to be recognized is determined according to the first preset positioning identifier in the image to be recognized. District and control area, including:
    在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区、对照区和背景区;When the type of the target object is a test strip, the test area, the control area, and the background area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
    相应地,所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息之前,所述方法还包括:Correspondingly, before the extracting the first feature information in the test area and extracting the second feature information in the control area, the method further includes:
    采用预设矩形对所述背景区进行扫描,获得各矩形的第三灰度积分值;Scanning the background area by using a preset rectangle to obtain a third gray level integral value of each rectangle;
    计算各矩形的第三灰度积分值之间的方差;Calculating a variance between the third gray level integral values of the respective rectangles;
    在所述方差未超过预设阈值时,执行所述提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息的步骤。When the variance does not exceed the preset threshold, the step of extracting the first feature information in the test area and extracting the second feature information in the control area is performed.
  6. 如权利要求1所述的方法,其特征在于,所述获取目标对象的待识别图像之后,所述方法还包括:The method of claim 1, wherein after the acquiring the image to be identified of the target object, the method further comprises:
    在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区和背景区;When the type of the target object is a digital dial, determining a numerical area and a background area in the to-be-identified image according to the second preset positioning identifier in the to-be-identified image;
    对所述数值区进行划分,获得所述数值区中各数字部分;Dividing the numerical value area to obtain each digital part in the numerical value area;
    对各数字部分与背景区进行灰度对比,获得各数字部分中数码管明暗组合;Performing gray scale comparison between each digital part and the background area to obtain a combination of digital tube light and dark in each digital part;
    根据各数字部分中数码管明暗组合确定对应的表盘数值;Determining the corresponding dial value according to the combination of the digital tube light and dark in each digital part;
    将所述表盘数值作为信息采集结果。The dial value is used as the information collection result.
  7. 如权利要求6所述的方法,其特征在于,所述在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区和背景区,具体包括:The method according to claim 6, wherein when the type of the target object is a digital dial, determining a value in the image to be recognized according to a second preset positioning identifier in the image to be identified District and background area, including:
    在所述目标对象的类型为数字表盘时,根据所述待识别图像中的第二预设定位标识确定所述待识别图像中的数值区、背景区和字符区;When the type of the target object is a digital dial, determining a numerical area, a background area, and a character area in the image to be recognized according to the second preset positioning identifier in the image to be identified;
    相应地,所述将所述表盘数值作为信息采集结果之前,所述方法还包括:Correspondingly, before the using the dial value as the information collection result, the method further includes:
    将所述字符区与背景区进行灰度对比,获得所述字符区中各像素点的明暗信息,根据所述字符区中各像素点的明暗信息及表盘特征分布图确定对应的字符内容;Performing gray scale comparison between the character area and the background area to obtain brightness and dark information of each pixel in the character area, and determining corresponding character content according to the brightness and dark information of each pixel point in the character area and the dial feature distribution map;
    相应地,所述将所述表盘数值作为信息采集结果,具体包括:Correspondingly, the using the dial value as the information collection result includes:
    将所述表盘数值及字符内容作为信息采集结果。The dial value and character content are used as information collection results.
  8. 如权利要求1所述的方法,其特征在于,所述获取目标对象的待识别图像之后,所述方法还包括:The method of claim 1, wherein after the acquiring the image to be identified of the target object, the method further comprises:
    在所述目标对象的类型为指针式表盘时,获得所述待识别图像中的第三预设定位标识及圆心;When the type of the target object is a pointer dial, obtain a third preset positioning identifier and a center of the image to be recognized;
    通过所述第三预设定位标识及圆心将所述待识别图像进行水平校正;Level-correcting the image to be recognized by the third preset positioning identifier and the center of the circle;
    采用预设扇形绕所述圆心对水平校正后的待识别图像进行扫描,获得各扇形的第四灰度积分值;Scanning the horizontally corrected image to be recognized by using a preset fan shape around the center of the circle to obtain a fourth gray level integral value of each sector shape;
    将第四灰度积分值最大的扇形的中分线与水平方向之间的夹角作为指针偏转角度;The angle between the center line of the sector having the largest fourth gray level integral value and the horizontal direction is taken as the pointer deflection angle;
    根据所述指针偏转角度确定对应的指针数值;Determining a corresponding pointer value according to the pointer deflection angle;
    将所述指针数值作为信息采集结果。The pointer value is used as the information collection result.
  9. 如权利要求1所述的方法,其特征在于,所述获取目标对象的待识别图像之前,所述方法还包括:The method of claim 1, wherein before the acquiring the image to be identified of the target object, the method further comprises:
    扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
    对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
    在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  10. 如权利要求2所述的方法,其特征在于,所述获取目标对象的待识别图像之前,所述方法还包括:The method of claim 2, wherein before the acquiring the image to be identified of the target object, the method further comprises:
    扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
    对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
    在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  11. 如权利要求3所述的方法,其特征在于,所述获取目标对象的待识别图像之前,所述方法还包括:The method of claim 3, wherein before the acquiring the image to be identified of the target object, the method further comprises:
    扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
    对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
    在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  12. 如权利要求5所述的方法,其特征在于,所述获取目标对象的待识别图像之前,所述方法还包括:The method of claim 5, wherein before the acquiring the image to be identified of the target object, the method further comprises:
    扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
    对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
    在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  13. 如权利要求6所述的方法,其特征在于,所述获取目标对象的待识别图像之前,所述方法还包括:The method of claim 6, wherein the method further comprises: before acquiring the image to be identified of the target object:
    扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
    对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
    在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  14. 如权利要求7所述的方法,其特征在于,所述获取目标对象的待识别图像之前,所述方法还包括:The method of claim 7, wherein the method further comprises: before acquiring the image to be identified of the target object:
    扫描与所述目标对象绑定的图码信息,获得所述图码信息中的对象标识号及出厂信息;Scanning the code information bound to the target object to obtain an object identification number and factory information in the graphic code information;
    对所述对象标识号及出厂信息进行验证;Verifying the object identification number and the factory information;
    在验证通过时,根据所述对象标识号及出厂信息确定所述目标对象的类型,并执行所述获取目标对象的待识别图像的步骤。When the verification is passed, the type of the target object is determined according to the object identification number and the factory information, and the step of acquiring the image to be recognized of the target object is performed.
  15. 一种移动终端,其特征在于,所述移动终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的信息采集程序,所述信息采集程序配置为实现以下步骤:A mobile terminal, comprising: a memory, a processor, and an information collecting program stored on the memory and operable on the processor, wherein the information collecting program is configured to implement the following steps :
    获取目标对象的待识别图像;Obtaining an image to be identified of the target object;
    在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;When the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
    提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;Extracting first feature information in the test area, and extracting second feature information in the control area;
    根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。And determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as the information collection result.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有信息采集程序,所述信息采集程序被处理器执行时实现以下步骤:A computer readable storage medium, wherein the computer readable storage medium stores an information collection program, and when the information collection program is executed by the processor, the following steps are implemented:
    获取目标对象的待识别图像;Obtaining an image to be identified of the target object;
    在所述目标对象的类型为检测试纸时,根据所述待识别图像中的第一预设定位标识确定所述待识别图像中的测试区和对照区;When the type of the target object is a test strip, the test area and the control area in the image to be recognized are determined according to the first preset positioning identifier in the image to be identified;
    提取所述测试区中的第一特征信息,并提取所述对照区中的第二特征信息;Extracting first feature information in the test area, and extracting second feature information in the control area;
    根据所述第一特征信息和第二特征信息确定对应的指标数值,并将确定的指标数值作为信息采集结果。 And determining, according to the first feature information and the second feature information, a corresponding indicator value, and using the determined indicator value as the information collection result.
PCT/CN2017/096881 2017-05-05 2017-08-10 Image recognition based information collection method, mobile terminal and storage medium WO2018201638A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710319545.2 2017-05-05
CN201710319545.2A CN107256379B (en) 2017-05-05 2017-05-05 Information acquisition method based on image recognition, mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2018201638A1 true WO2018201638A1 (en) 2018-11-08

Family

ID=60027957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/096881 WO2018201638A1 (en) 2017-05-05 2017-08-10 Image recognition based information collection method, mobile terminal and storage medium

Country Status (2)

Country Link
CN (1) CN107256379B (en)
WO (1) WO2018201638A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781726A (en) * 2019-09-11 2020-02-11 深圳壹账通智能科技有限公司 Image data identification method and device based on OCR (optical character recognition), and computer equipment
CN112053340A (en) * 2020-08-28 2020-12-08 安徽江淮汽车集团股份有限公司 Performance test method, device, storage medium and device of automobile display equipment
CN112906681A (en) * 2019-12-04 2021-06-04 杭州海康威视数字技术股份有限公司 Meter reading method and device, electronic equipment and storage medium
CN113096111A (en) * 2021-04-25 2021-07-09 深圳市永丰盈电子有限公司 Material detection method, system, computer program product and readable storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263778A (en) * 2018-03-12 2019-09-20 中移物联网有限公司 A kind of meter register method and device based on image recognition
CN108960237B (en) * 2018-06-29 2022-02-18 上海海事大学 Reading identification method for pointer type oil level indicator
CN110909572A (en) * 2018-09-17 2020-03-24 阿里巴巴集团控股有限公司 Target object identification method and system
CN109406506B (en) * 2018-12-06 2020-03-17 北京腾康汇医科技有限公司 Shared self-testing health terminal and testing method
CN110378248B (en) * 2019-06-25 2023-07-21 平安科技(深圳)有限公司 Pie chart identification method, device, equipment and computer readable storage medium
CN110765994B (en) * 2019-10-10 2023-05-26 广东小天才科技有限公司 Book content positioning method and device, electronic equipment and storage medium
CN111579211B (en) * 2020-05-19 2022-09-30 Oppo(重庆)智能科技有限公司 Display screen detection method, detection device and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176228A (en) * 2011-01-28 2011-09-07 河海大学常州校区 Machine vision method for identifying dial plate information of multi-pointer instrument
CN103942551A (en) * 2014-03-24 2014-07-23 北京国网富达科技发展有限责任公司 Image-based arrester leakage current recognition method and system for convertor station
CN104112153A (en) * 2014-07-17 2014-10-22 上海透云物联网科技有限公司 Method for bar code recognition based on mobile terminal and system thereof
CN104751187A (en) * 2015-04-14 2015-07-01 山西科达自控股份有限公司 Automatic meter-reading image recognition method
CN105606608A (en) * 2016-03-28 2016-05-25 广州博厚生物科技有限公司 Image gray-scale processing based data computing method and application thereof in detection field

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101516175B (en) * 2008-02-21 2012-11-21 鸿富锦精密工业(深圳)有限公司 Double-type product line rework system and control method of rework production flow thereof
USD694425S1 (en) * 2011-12-12 2013-11-26 Charm Sciences, Inc. Recognition test strip
CN103389372B (en) * 2012-05-08 2016-02-24 艾博生物医药(杭州)有限公司 A kind of test strips being applicable to electronic reading out device and reading
CN103207987B (en) * 2013-02-28 2016-05-18 华北电力大学 A kind of registration recognition methods of pointer instrument
CN104573702A (en) * 2014-12-01 2015-04-29 长沙众治电气技术有限公司 Method for automatically identifying sulfur hexafluoride pressure instrument image
CN104964973A (en) * 2015-07-08 2015-10-07 邓双胜 Test paper reading and analyzing method and system based on mobile terminal camera

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176228A (en) * 2011-01-28 2011-09-07 河海大学常州校区 Machine vision method for identifying dial plate information of multi-pointer instrument
CN103942551A (en) * 2014-03-24 2014-07-23 北京国网富达科技发展有限责任公司 Image-based arrester leakage current recognition method and system for convertor station
CN104112153A (en) * 2014-07-17 2014-10-22 上海透云物联网科技有限公司 Method for bar code recognition based on mobile terminal and system thereof
CN104751187A (en) * 2015-04-14 2015-07-01 山西科达自控股份有限公司 Automatic meter-reading image recognition method
CN105606608A (en) * 2016-03-28 2016-05-25 广州博厚生物科技有限公司 Image gray-scale processing based data computing method and application thereof in detection field

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781726A (en) * 2019-09-11 2020-02-11 深圳壹账通智能科技有限公司 Image data identification method and device based on OCR (optical character recognition), and computer equipment
CN112906681A (en) * 2019-12-04 2021-06-04 杭州海康威视数字技术股份有限公司 Meter reading method and device, electronic equipment and storage medium
CN112053340A (en) * 2020-08-28 2020-12-08 安徽江淮汽车集团股份有限公司 Performance test method, device, storage medium and device of automobile display equipment
CN112053340B (en) * 2020-08-28 2023-03-14 安徽江淮汽车集团股份有限公司 Performance test method, equipment, storage medium and device of automobile display equipment
CN113096111A (en) * 2021-04-25 2021-07-09 深圳市永丰盈电子有限公司 Material detection method, system, computer program product and readable storage medium

Also Published As

Publication number Publication date
CN107256379B (en) 2021-06-22
CN107256379A (en) 2017-10-17

Similar Documents

Publication Publication Date Title
WO2018201638A1 (en) Image recognition based information collection method, mobile terminal and storage medium
WO2021003930A1 (en) Quality inspection method, apparatus, and device for customer service audio, and computer readable storage medium
WO2020062616A1 (en) Method and apparatus for regulating gamma value of display panel, and display device
WO2018076757A1 (en) Person location acquisition method and device
EP3759617A1 (en) Electronic apparatus and controlling method thereof
WO2019107981A1 (en) Electronic device recognizing text in image
WO2018166099A1 (en) Information leakage detection method and device, server, and computer-readable storage medium
WO2020062615A1 (en) Gamma value adjustment method and apparatus for display panel, and display device
WO2018008881A1 (en) Terminal device and service server, method and program for providing diagnostic analysis service performed by same device, and computer-readable recording medium having same program recorded therein
WO2019135475A1 (en) Electronic apparatus and control method thereof
WO2018129960A1 (en) Screen flickering processing method, device, storage medium, and electronic device
WO2014189275A1 (en) Apparatus and method of recognizing external device in a communication system
WO2017131348A1 (en) Electronic apparatus and controlling method thereof
WO2020168606A1 (en) Advertisement video optimising method, apparatus and device and computer readable storage medium
WO2021054784A1 (en) Electronic device and method for changing user interface according to user input
WO2020114333A1 (en) Video-based ar education method, smart television, storage medium, and device
WO2019088481A1 (en) Electronic device and image correction method thereof
WO2019045543A1 (en) Display apparatus, content managing apparatus, content managing system, and content managing method
WO2019039713A1 (en) Method and apparatus for determining location by using identification information corresponding to external electronic device
WO2020135051A1 (en) Image optimization method and device for display panel, and computer readable storage medium
WO2020135022A1 (en) Display panel image optimization method and device and computer readable storage medium
WO2020224089A1 (en) Pattern code position adjustment method and apparatus, and computer readable storage medium
WO2021132743A1 (en) Electronic device for displaying application-related content, and method for controlling same
WO2022182104A1 (en) Table creation method and system, and method and system for correcting image including table
WO2020134003A1 (en) Input method for smart television, smart television, mobile terminal and storage medium

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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 18/05/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17908737

Country of ref document: EP

Kind code of ref document: A1