CN113312936A - Image positioning identification recognition method and server - Google Patents
Image positioning identification recognition method and server Download PDFInfo
- Publication number
- CN113312936A CN113312936A CN202110523590.6A CN202110523590A CN113312936A CN 113312936 A CN113312936 A CN 113312936A CN 202110523590 A CN202110523590 A CN 202110523590A CN 113312936 A CN113312936 A CN 113312936A
- Authority
- CN
- China
- Prior art keywords
- target
- image
- matching degree
- subgraph
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 238000012545 processing Methods 0.000 claims description 9
- 230000004807 localization Effects 0.000 claims 5
- 238000004891 communication Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 5
- 230000007547 defect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1443—Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1452—Methods for optical code recognition including a method step for retrieval of the optical code detecting bar code edges
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Electromagnetism (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention provides an image positioning identification recognition method and a server, which are applied to the technical field of image recognition. The method provided by the invention repeatedly identifies the positioning identifier in the target subgraph, and enlarges the range of the target subgraph after each failure, namely, enlarges the identification range, thereby effectively solving the problem that the positioning identifier cannot be accurately found due to the deviation of the image content in the prior art and improving the success rate of identification.
Description
Technical Field
The invention relates to the technical field of image recognition, in particular to an image positioning identification recognition method and a server.
Background
At present, an image recognition technology has been widely applied to many aspects of electrical equipment deployment, information acquisition and the like, for example, in a process of deploying electrical equipment such as an inverter in a photovoltaic power station, an equipment location table for recording an equipment deployment location is often used, and the equipment location table is pre-manufactured according to electrical equipment arranged in a row and column manner in the photovoltaic power station. In the process of installing the electrical equipment, a worker tears off the two-dimensional code label on each electrical equipment, and pastes the label in a corresponding table in a paper equipment position table according to the row number and the column number of the equipment, namely, the deployment information of each equipment in the power station is counted through an equipment record table. After the photovoltaic power station is deployed, acquiring an original image of a paper equipment position table by using image acquisition equipment, and further performing image recognition on the original image to obtain corresponding digital information.
Most of image recognition processes are usually developed based on positioning marks in original images, and accurate recognition of the positioning marks is the most important preliminary work for completing image content recognition. The image positioning identification method in the prior art has strict requirements on the position of the positioning identification in the original image, when the acquired original image has serious image content deviation, the prior art is difficult to effectively identify the positioning identification, the success rate of the identification of the positioning identification is low, and the actual application requirements cannot be met.
Disclosure of Invention
The invention provides an image positioning identifier recognition method and a server, which are used for continuously expanding the range of sub-images in the identification process of positioning identifiers, and are beneficial to improving the probability of recognizing the positioning identifiers, thereby improving the success rate of recognition.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
in a first aspect, the present invention provides an image positioning identifier recognition method, including:
acquiring a target subgraph from an original image, wherein the original image comprises a positioning identifier;
identifying the positioning identification in the target subgraph;
if the positioning identifier is not recognized in the target subgraph and a preset exit condition is not reached, expanding the range of the target subgraph;
and returning to the step of executing the positioning identification recognition in the target subgraph until the preset end condition is reached or the positioning identification is recognized in the target subgraph.
Optionally, the identifying the positioning identifier in the target sub-graph includes:
acquiring a target matching degree threshold value and a template image corresponding to the positioning identifier;
calculating the current matching degree of the target subgraph and the template image;
and determining whether the positioning identifier is recognized in the target subgraph or not according to the size relation between the current matching degree and the target matching degree threshold.
Optionally, the calculating a current matching degree of the target sub-image and the template image includes:
acquiring a target binarization threshold value;
carrying out binarization processing on the target subgraph based on the target binarization threshold value to obtain a binarization target subgraph;
calculating the current matching degree of the binaryzation target subgraph and the template image by using a preset matching degree algorithm;
and taking the current matching degree of the binarization target subgraph and the template image as the current matching degree of the target subgraph and the template image.
Optionally, the determining, according to a size relationship between the current matching degree and the target matching degree threshold, whether the positioning identifier is identified in the target sub-graph includes:
if the current matching degree is larger than or equal to the target matching degree threshold value, determining that the positioning identifier is recognized in the target subgraph;
and if the current matching degree is smaller than the target matching degree threshold value, determining that the positioning identifier is not recognized in the target subgraph.
Optionally, before the obtaining the target sub-image from the original image, the method further includes:
acquiring a plurality of initial subgraphs from an original image;
identifying the positioning identification in each initial sub-graph respectively;
and if the number of the initial subgraphs of the positioning identification is smaller than a preset number threshold value, executing the step of acquiring the target subgraphs from the original image.
Optionally, the identifying the positioning identifier in each of the initial sub-graphs respectively includes:
for each of the initial subgraphs, performing the following operations:
carrying out binarization processing on the initial subgraph based on a binarization threshold corresponding to the initial subgraph to obtain a binarization initial subgraph;
calculating the reference matching degree of the binaryzation initial subgraph and the template image by using the preset matching degree algorithm;
and determining whether the positioning identifier is identified in the initial subgraph or not according to the size relation between the reference matching degree and a reference matching degree threshold.
Optionally, the obtaining of the target binarization threshold includes:
calculating the average value of the binarization threshold values corresponding to the initial sub-images to obtain a first threshold value average value;
and taking the minimum value of the first threshold mean value and the maximum value of a preset binarization threshold as a target binarization threshold.
Optionally, the obtaining the target matching degree threshold includes:
calculating the average value of each reference matching degree to obtain a second threshold average value;
calculating the product of the second threshold mean value and a preset matching coefficient to obtain a candidate matching degree threshold;
and taking the maximum value of the candidate matching degree threshold value and the minimum value of a preset matching degree threshold value as a target matching degree threshold value.
Optionally, the expanding the range of the target subgraph includes:
and expanding the range of the target subgraph according to a preset proportion or a preset step length.
Optionally, the determining whether the positioning identifier is identified in the initial sub-image according to the matching degree threshold corresponding to the binarized initial sub-image includes:
calculating the matching degree of the binaryzation initial subgraph and the template image by using the preset matching degree algorithm to obtain a reference matching degree;
if the reference matching degree is larger than or equal to a matching degree threshold corresponding to the binaryzation initial subgraph, judging that the positioning identifier is recognized in the initial subgraph;
and if the reference matching degree is smaller than the matching degree threshold value corresponding to the binaryzation initial subgraph, judging that the positioning identifier is not recognized in the initial subgraph.
Optionally, the obtaining a target sub-image from an original image includes:
acquiring a preset width proportion and a preset length proportion;
the preset width proportion and the preset length proportion are respectively obtained based on the position relation of a positioning mark in a preset standard image in the standard image;
determining a target positioning reference point in the original image according to the preset width proportion and the preset length proportion;
and acquiring a target subgraph based on the target positioning reference points.
Optionally, the preset end condition includes: the width of the target subgraph is larger than a preset subgraph width threshold value, or the length of the target subgraph is larger than a preset subgraph length threshold value.
Optionally, if the positioning identifier is identified in the target sub-image, the original image is corrected based on the positioning identifier.
In a second aspect, the present invention provides a server comprising: a memory and a processor; the memory stores a program suitable for the processor to execute so as to implement the image positioning identification recognition method according to any one of the first aspect of the present invention.
The image positioning identification recognition method provided by the invention is characterized in that after a target subgraph is obtained from an original image, a positioning identification is recognized in the target subgraph, if the positioning identification is not recognized in the target subgraph and does not reach a preset exit condition, the range of the target subgraph is expanded, and the positioning identification is continuously recognized in the target subgraph until a preset end condition or the positioning identification is recognized. The method provided by the invention repeatedly identifies the positioning identifier in the target subgraph, and enlarges the range of the target subgraph after each failure, namely, enlarges the identification range, thereby effectively solving the problem that the positioning identifier cannot be accurately found due to the deviation of the image content in the prior art and improving the success rate of identification.
Further, as the expansion process of the target subgraph is carried out step by step along with the identification process, the identification range is increased step by step, and the influence on the identification efficiency can be reduced to the minimum.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a device location table image in the prior art;
FIG. 2 is a schematic illustration of another prior art device location table image;
FIG. 3 is a flowchart of an image positioning identifier recognition method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a process of identifying a positioning mark by applying the image positioning mark identification method according to an embodiment of the present invention;
FIG. 5 is a flow chart of another image location identification method according to an embodiment of the present invention;
fig. 6 is a schematic view of an application scenario of the image positioning identifier recognition method according to an embodiment of the present invention;
fig. 7 is a schematic view of another application scenario of the image positioning identifier recognition method according to the embodiment of the present invention;
fig. 8 is a block diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In practical application, besides the defect shown in fig. 1, the defect shown in fig. 2 may also occur in the acquired original image, and a sub-image acquisition area preset by the severe principle of positioning identification may be further caused, so that any positioning identification cannot be recognized. Of course, other defects may occur in the original image, and are not listed here.
In order to solve the problems encountered in image recognition in the practical application, an embodiment of the present invention provides an image positioning identifier recognition method, which may be applied to an electronic device, where the electronic device may be an electronic device capable of running a preset control program to perform data analysis, such as a notebook computer, a personal computer, a tablet computer, and a data server. Referring to fig. 3, a flow of the image positioning identifier recognition method provided by the embodiment of the present invention may include:
s100, acquiring a target subgraph from the original image comprising the positioning identifier.
It is conceivable that the original image including the positioning identifier first needs to be obtained before the target sub-image is acquired from the original image. The method for acquiring or acquiring the original image may be implemented based on the prior art, which is not limited in the present invention. The specific form of the positioning mark in the original image can also be implemented based on the prior art, and the present invention is not limited thereto.
Optionally, an embodiment of the present invention provides a method for obtaining a target subgraph, which first obtains a preset width ratio and a preset length ratio. The preset width ratio and the preset length ratio mentioned in this embodiment are obtained based on the position relationship of the positioning identifier in the preset standard image in the standard image, respectively.
In the prior art, a standard image corresponding to an image to be recognized needs to be prepared in advance before image recognition, and the standard image is that the position and the size of each element in the image, and the proportion and the relative position relation between the elements are determined. Before the original image is corrected, the electronic device stores information of a standard image, and defines related information of each element (such as a positioning mark) in the standard image in a pixel coordinate system, such as a specific proportion of the positioning mark, a relative position in the image, a relative distance from a wire frame to be recognized in the image, and the like. For the determined standard image, the ratio of the abscissa in the coordinates of the reference positioning point of the positioning identifier to the standard length of the standard image is fixed, and correspondingly, the ratio of the ordinate in the coordinates of the reference positioning point to the standard width of the standard image is also fixed. The image content in the original image obtained by actual acquisition is often scaled proportionally, so that if the content in the original image is normal and no offset or scaling occurs, the target sub-image extracted according to the preset width proportion and the preset length proportion necessarily comprises a positioning identifier.
Based on the above, after the preset width proportion and the preset length proportion are obtained, the ordinate of the target positioning reference point can be determined according to the preset width proportion, the abscissa of the target positioning reference point is determined according to the preset length proportion, that is, the target positioning reference point is determined, and then the preset area with the target positioning reference point as the center can be used as the target subgraph. Of course, as for the specific selection of the preset range, the specific shape and size of the positioning mark and the experience need to be selected. In the scheme, the range of the target subgraph can be continuously enlarged, so that the target subgraph obtained for the first time can be selected to be relatively smaller.
Of course, the target subgraph can be obtained according to a subgraph obtaining method in the prior art, and details are not described here.
And S110, identifying a positioning identifier in the target subgraph.
Firstly, a target matching degree threshold value and a template image corresponding to the positioning identifier are obtained. The template image refers to an image prepared in advance for identifying or searching a target image element, and can be understood as a standard of a positioning identifier. The target matching degree threshold is a judgment basis for determining whether the positioning identifier is identified, and in practical application, the target matching degree threshold can be selected by combining design experience or determined according to a certain algorithm.
And after the template image corresponding to the positioning identifier is obtained, calculating the current matching degree of the target subgraph and the template image. Optionally, an embodiment of the present invention provides an implementation method for calculating a current matching degree. And acquiring a target binarization threshold, wherein the target binarization threshold is used for performing binarization processing on a target subgraph, and is similar to a target matching degree threshold, and the target binarization threshold can be selected based on actual design experience, and can also be determined according to a method provided by the invention in subsequent contents, which is not detailed here for the moment. And after the binarization threshold value is obtained, carrying out binarization processing on the target sub-image based on the target binarization threshold value to obtain a binarization target sub-image, then calculating the current matching degree of the binarization target sub-image and the template image by using a preset matching degree algorithm, and taking the current matching degree of the binarization target sub-image and the template image as the current matching degree of the target sub-image and the template image. It should be noted that, the preset matching degree algorithm may be implemented based on an algorithm in the prior art, which is not limited in the present invention.
And finally, after the current matching degree of the target subgraph is obtained, determining whether the positioning identifier is identified in the target subgraph according to the size relation between the current matching degree and the target matching degree threshold value.
And S120, judging whether the positioning identifier is identified in the target subgraph, and if not, executing S130.
Based on the foregoing, if the obtained current matching degree is greater than or equal to the target matching degree threshold, it is determined that the positioning identifier is recognized in the target sub-graph, and conversely, if the current matching degree is less than the target matching degree threshold, it is determined that the positioning identifier is not recognized in the target sub-graph.
And executing S130 under the condition that the positioning identifier is not recognized in the target subgraph, and if the positioning identifier is recognized in the target subgraph, exiting the current control process and further correcting the original image based on the obtained positioning identifier.
S130, judging whether a preset exit condition is reached, if not, executing S140.
Optionally, the preset exit condition provided in the embodiment of the present invention includes: the width of the target subgraph is larger than a preset subgraph width threshold, or the length of the target subgraph is larger than a preset subgraph length threshold. Of course, the preset exit condition may also be the number of cycles, etc., and also falls within the protection scope of the present invention without exceeding the scope of the core idea of the present invention.
It is conceivable that if the target sub-graph is expanded to the periphery at the same time, a situation that one side of the target sub-graph is expanded to the edge of the original image first occurs, and in such a situation, the expansion of the target sub-graph can be stopped in the direction of the side, so that the purpose of reducing the calculation amount to a certain extent is achieved, and the improvement of the recognition efficiency is facilitated.
And S140, expanding the range of the target subgraph and returning to S110.
And if the positioning identifier is not recognized in the target sub-graph and the preset exit condition is not reached, expanding the range of the target sub-graph according to a preset proportion or a preset step length.
It is conceivable that the preset proportion may be used for the whole expansion of the target sub-graph, or for the expansion of the width and length of the target sub-graph, and the preset step size is mainly used for the increase of the width and length of the target sub-graph, and certainly, step sizes with different sizes may be set in the width direction and the length direction according to the requirement, so as to realize the identification of the emphasis in a certain direction.
The selection of the preset step length can be selected based on the actual computing capacity of the device and the requirement of identification precision, and the actual application can be characterized by adopting the number of pixels.
Optionally, referring to fig. 4, fig. 4 is a schematic diagram of a process of performing location identifier recognition by applying the image location identifier recognition method according to the embodiment of the present invention, as shown in fig. 4, fsp represents a range of a target sub-graph during first recognition, incrP represents a preset step size, maxSW represents a preset sub-graph length threshold in the content, maxSH represents a preset sub-graph width in the content, and the range of the target sub-graph is continuously expanded by incrP until reaching a sub-graph range corresponding to maxSW and maxSH.
And after the range of the target subgraph is enlarged, returning to execute S110, and continuously identifying the positioning identifier in the target subgraph.
In summary, the method provided by the present invention repeatedly identifies the positioning identifier in the target sub-image, and expands the range of the target sub-image after each failure, i.e. increases the identification range, thereby effectively solving the problem in the prior art that the positioning identifier cannot be accurately found due to the deviation of the image content, and increasing the success rate of identification.
Furthermore, the expansion process of the target subgraph is carried out step by step along with the identification process, the identification range is increased step by step, the target subgraph with the largest size is prevented from being directly adopted for identification, and the influence on the identification efficiency can be reduced to the lowest.
It should be emphasized that, in the prior art, an original image includes a plurality of location identifiers, which is most commonly a location identifier, which means that the embodiment shown in fig. 3 has two application modes, one of which is to sequentially apply the method to identify each location identifier according to a certain sequence, and the application mode has a smaller requirement on the computing capability of the device, but the whole process is time-consuming and is especially the case that the number of location identifiers is large; the other method is to identify each positioning mark at the same time, and the application mode has higher requirement on the computing capacity of the equipment, but the whole identification process has shorter time consumption and high efficiency. The specific choice needs to be determined by combining the actual hardware equipment and the identification efficiency requirement.
Optionally, on the basis of the embodiment shown in fig. 3, an embodiment of the present invention provides another image positioning identifier recognition method, referring to fig. 5, on the basis of the embodiment shown in fig. 3, the method provided in this embodiment further includes:
and S200, acquiring a plurality of initial subgraphs from the original image.
For the initial subgraph, the acquisition may be implemented according to the prior art, or may be implemented according to the method provided in S100 in fig. 3, which is not limited in the present invention.
And S210, identifying positioning identifications in each initial sub-graph respectively.
After obtaining a plurality of initial subgraphs, the following operations are performed for each initial subgraph:
firstly, carrying out binarization processing on the initial subgraph based on a binarization threshold corresponding to the initial subgraph to obtain a binarization initial subgraph. Further, considering that the binarization threshold corresponding to each initial subgraph in this step will be used for the calculation of the aforementioned target binarization threshold, the binarization threshold corresponding to each initial subgraph mentioned in this step is preferably a corresponding adaptive threshold. The process of binarizing the initial subgraph can be specifically realized by referring to the prior art, and is not expanded in detail here.
Then, the matching degree of the binarized initial sub-image and the template image of the positioning identifier is calculated by using the preset matching degree algorithm mentioned in the foregoing embodiment to obtain the reference matching degree, and then whether the positioning identifier is recognized in the initial sub-image is judged according to the magnitude relation between the reference matching degree and the preset reference matching degree threshold.
Specifically, if the reference matching degree is greater than or equal to the reference matching degree threshold value, the positioning identifier is identified in the initial sub-graph; on the contrary, if the reference matching degree is smaller than the reference matching degree threshold value, the positioning mark is judged not to be recognized in the initial sub-graph.
It should be noted that, in the method provided in this embodiment, a stricter recognition standard needs to be performed on the initial sub-graph compared to the prior art, and therefore, in the foregoing method, whether the reference matching degree threshold used in the process of identifying the location identifier is identified in the initial sub-graph should be combined with historical data in the actual identification process, a stricter threshold should be selected as much as possible, and a strict judgment standard is executed, so as to improve the accuracy of identifying the location identifier.
Further, the binarization threshold and the reference matching degree threshold corresponding to each initial subgraph mentioned in this step can be determined based on the prior art, and are not described in detail here.
And S220, judging whether the number of the identified initial sub-images of the positioning identification is smaller than a preset number threshold, if so, executing S100.
In combination with the application of the positioning marks in image recognition, in most cases, the number of the recognized positioning marks should be greater than or equal to three, and if the number of the recognized positioning marks is less than three, it is difficult to determine the position of the content to be recognized in the original image based on the principle of triangulation.
Based on this, after the initial sub-images are recognized, if the number of the initial sub-images in which the positioning identifier is recognized is smaller than the preset number threshold, which indicates that the currently recognized positioning identifier is difficult to be used for subsequent image recognition, S100 and subsequent steps are continuously performed, which may specifically refer to the implementation process of the embodiment shown in fig. 3, and will not be repeated here.
Correspondingly, if the number of the identified initial sub-images of the positioning identifier is greater than or equal to the preset number threshold, the subsequent image identification operation can be performed based on the identified positioning identifier, and the step S100 and the subsequent steps are not executed.
It is conceivable that the setting of the preset number threshold mainly depends on the implementation principle of positioning the image content in the image recognition process, and as described above, if at least three positioning identifiers are required, the number of the preset number threshold may be three.
In summary, before executing the recognition process of the embodiment shown in fig. 3, the image positioning identifier recognition method according to the embodiment of the present invention first determines whether the positioning identifier meeting the image recognition requirement can be obtained through one recognition according to a stricter recognition mode, and if the positioning identifier meeting the requirement is indeed obtained after one strict recognition, the subsequent process of circularly increasing the sub-graph range is not required to be executed, so that the time consumption for recognizing the positioning identifier can be effectively reduced, and the execution efficiency of the whole positioning identifier recognition can be further improved.
Optionally, based on the above content in the embodiment shown in fig. 5, the present invention further provides a method for calculating the target binarization threshold and the target matching degree threshold in the embodiment shown in fig. 3.
Specifically, when the initial subgraph is subjected to binarization processing, the binarization threshold value corresponding to each initial subgraph is used, based on the binarization threshold value, the average value of the binarization threshold values corresponding to each initial subgraph is calculated to obtain a first threshold value average value, and the minimum value of the first threshold value average value and the preset binarization threshold value maximum value is used as the target binarization threshold value.
It is conceivable that, if the original image has the image content scaling shown in fig. 2, the initial subgraph is blank, and there is no image content, in this case, the binarization threshold corresponding to each initial subgraph is very large, and the average value thereof cannot be used as the target binarization threshold, therefore, in the embodiment of the present invention, the preset binarization threshold is set according to the history data and the design experience, and if the obtained first threshold average value is greater than the preset binarization threshold, the preset binarization threshold is used as the target binarization threshold.
Similar to the determination process of the target binarization threshold, the target matching degree threshold is determined based on the reference matching degree corresponding to each binarization initial sub-image in S210, first, an average value of the reference matching degrees corresponding to each binarization initial sub-image is calculated to obtain a second threshold average value, a product of the second threshold average value and a preset matching coefficient is further calculated to obtain a candidate matching degree threshold, and finally, the largest one of the obtained candidate matching degree threshold and the preset matching degree threshold minimum value is used as the target matching degree threshold. Of course, the preset matching degree threshold and the preset matching coefficient mentioned here can be flexibly selected according to the actual experience and the requirement of the identification precision, and the specific values of the preset matching degree threshold and the preset matching coefficient are not limited in the present invention.
Optionally, the image positioning identifier recognition method provided in each of the embodiments of the present invention may be applied to positioning identifiers in a plurality of scenes, for example, may be applied to positioning identifier recognition in an answer sheet shown in fig. 6, may also be applied to recognition of positioning identifiers of monitoring images of photovoltaic modules or photovoltaic arrays shown in fig. 7, and of course, may also be applied to other scenes where image recognition is performed based on positioning identifiers, which is not listed here.
Optionally, referring to fig. 8, fig. 8 is a block diagram of a server according to an embodiment of the present invention, and as shown in fig. 8, the server may include: at least one processor 100, at least one communication interface 200, at least one memory 300, and at least one communication bus 400;
in the embodiment of the present invention, the number of the processor 100, the communication interface 200, the memory 300, and the communication bus 400 is at least one, and the processor 100, the communication interface 200, and the memory 300 complete the communication with each other through the communication bus 400; it is clear that the communication connections shown by the processor 100, the communication interface 200, the memory 300 and the communication bus 400 shown in fig. 8 are only optional;
optionally, the communication interface 200 may be an interface of a communication module, such as an interface adapted to a vehicle-mounted OBD interface or other CAN network interfaces;
the processor 100 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 300, which stores application programs, may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 100 is specifically configured to execute an application program in the memory to implement any embodiment of the image location identification recognition method described above.
The embodiments of the invention are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments can be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.
Claims (14)
1. An image positioning identification recognition method is characterized by comprising the following steps:
acquiring a target subgraph from an original image, wherein the original image comprises a positioning identifier;
identifying the positioning identification in the target subgraph;
if the positioning identifier is not recognized in the target subgraph and a preset exit condition is not reached, expanding the range of the target subgraph;
and returning to the step of executing the positioning identification recognition in the target subgraph until the preset end condition is reached or the positioning identification is recognized in the target subgraph.
2. The image location identity recognition method of claim 1, wherein the recognizing the location identity in the target sub-graph comprises:
acquiring a target matching degree threshold value and a template image corresponding to the positioning identifier;
calculating the current matching degree of the target subgraph and the template image;
and determining whether the positioning identifier is recognized in the target subgraph or not according to the size relation between the current matching degree and the target matching degree threshold.
3. The image positioning identification recognition method of claim 2, wherein the calculating the current matching degree of the target sub-image and the template image comprises:
acquiring a target binarization threshold value;
carrying out binarization processing on the target subgraph based on the target binarization threshold value to obtain a binarization target subgraph;
calculating the current matching degree of the binaryzation target subgraph and the template image by using a preset matching degree algorithm;
and taking the current matching degree of the binarization target subgraph and the template image as the current matching degree of the target subgraph and the template image.
4. The image positioning identifier recognition method according to claim 2, wherein the determining whether the positioning identifier is recognized in the target sub-graph according to a magnitude relationship between the current matching degree and the target matching degree threshold value comprises:
if the current matching degree is larger than or equal to the target matching degree threshold value, determining that the positioning identifier is recognized in the target subgraph;
and if the current matching degree is smaller than the target matching degree threshold value, determining that the positioning identifier is not recognized in the target subgraph.
5. The image positioning identification recognition method of claim 3, further comprising, before the obtaining the target sub-image from the original image:
acquiring a plurality of initial subgraphs from an original image;
identifying the positioning identification in each initial sub-graph respectively;
and if the number of the initial subgraphs of the positioning identification is smaller than a preset number threshold value, executing the step of acquiring the target subgraphs from the original image.
6. The image localization signature recognition method of claim 5, wherein said recognizing the localization signature in each of the initial subgraphs, respectively, comprises:
for each of the initial subgraphs, performing the following operations:
carrying out binarization processing on the initial subgraph based on a binarization threshold corresponding to the initial subgraph to obtain a binarization initial subgraph;
calculating the reference matching degree of the binaryzation initial subgraph and the template image by using the preset matching degree algorithm;
and determining whether the positioning identifier is identified in the initial subgraph or not according to the size relation between the reference matching degree and a reference matching degree threshold.
7. The image positioning identifier recognition method according to claim 6, wherein the obtaining of the target binarization threshold value comprises:
calculating the average value of the binarization threshold values corresponding to the initial sub-images to obtain a first threshold value average value;
and taking the minimum value of the first threshold mean value and the maximum value of a preset binarization threshold as a target binarization threshold.
8. The image positioning identification recognition method of claim 6, wherein the obtaining of the target matching degree threshold comprises:
calculating the average value of each reference matching degree to obtain a second threshold average value;
calculating the product of the second threshold mean value and a preset matching coefficient to obtain a candidate matching degree threshold;
and taking the maximum value of the candidate matching degree threshold value and the minimum value of a preset matching degree threshold value as a target matching degree threshold value.
9. The image positioning identification recognition method of claim 1, wherein the expanding the range of the target subgraph comprises:
and expanding the range of the target subgraph according to a preset proportion or a preset step length.
10. The image positioning identifier recognition method according to claim 6, wherein said determining whether the positioning identifier is recognized in the initial sub-image according to a matching threshold corresponding to the binarized initial sub-image comprises:
calculating the matching degree of the binaryzation initial subgraph and the template image by using the preset matching degree algorithm to obtain a reference matching degree;
if the reference matching degree is larger than or equal to a matching degree threshold corresponding to the binaryzation initial subgraph, judging that the positioning identifier is recognized in the initial subgraph;
and if the reference matching degree is smaller than the matching degree threshold value corresponding to the binaryzation initial subgraph, judging that the positioning identifier is not recognized in the initial subgraph.
11. The image positioning identification recognition method of claim 1, wherein the obtaining of the target sub-image from the original image comprises:
acquiring a preset width proportion and a preset length proportion;
the preset width proportion and the preset length proportion are respectively obtained based on the position relation of a positioning mark in a preset standard image in the standard image;
determining a target positioning reference point in the original image according to the preset width proportion and the preset length proportion;
and acquiring a target subgraph based on the target positioning reference points.
12. The image positioning identifier recognition method according to any one of claims 1 to 11, wherein the preset end condition comprises: the width of the target subgraph is larger than a preset subgraph width threshold value, or the length of the target subgraph is larger than a preset subgraph length threshold value.
13. The image localization identification recognition method according to any one of claims 1 to 11, wherein if the localization identification is recognized in the target sub-image, the original image is corrected based on the localization identification.
14. A server, comprising: a memory and a processor; the memory stores a program adapted to be executed by the processor to implement the image location identity recognition method according to any one of claims 1 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110523590.6A CN113312936A (en) | 2021-05-13 | 2021-05-13 | Image positioning identification recognition method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110523590.6A CN113312936A (en) | 2021-05-13 | 2021-05-13 | Image positioning identification recognition method and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113312936A true CN113312936A (en) | 2021-08-27 |
Family
ID=77373273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110523590.6A Pending CN113312936A (en) | 2021-05-13 | 2021-05-13 | Image positioning identification recognition method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113312936A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114241537A (en) * | 2021-12-31 | 2022-03-25 | 智慧眼科技股份有限公司 | Finger vein image authenticity identification method and device, computer equipment and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104639952A (en) * | 2015-01-23 | 2015-05-20 | 小米科技有限责任公司 | Method and device for identifying station logo |
WO2019007253A1 (en) * | 2017-07-06 | 2019-01-10 | 阿里巴巴集团控股有限公司 | Image recognition method, apparatus and device, and readable medium |
CN109934041A (en) * | 2019-03-26 | 2019-06-25 | 杭州网易再顾科技有限公司 | Information processing method, information processing system, medium and calculating equipment |
CN110689535A (en) * | 2019-09-29 | 2020-01-14 | 歌尔股份有限公司 | Workpiece identification method and device, electronic equipment and storage medium |
CN110751682A (en) * | 2019-10-28 | 2020-02-04 | 普联技术有限公司 | Method, device, terminal equipment and storage medium for extracting and identifying image |
CN111079613A (en) * | 2019-12-09 | 2020-04-28 | 北京明略软件系统有限公司 | Gesture recognition method and apparatus, electronic device, and storage medium |
CN111191570A (en) * | 2019-12-26 | 2020-05-22 | 国网北京市电力公司 | Image recognition method and device |
CN111368572A (en) * | 2018-12-26 | 2020-07-03 | 顺丰科技有限公司 | Two-dimensional code identification method and system |
WO2020253119A1 (en) * | 2019-06-18 | 2020-12-24 | 深圳壹账通智能科技有限公司 | Graphic verification code recognizing method and apparatus, readable storage medium, and terminal device |
WO2020259365A1 (en) * | 2019-06-27 | 2020-12-30 | Oppo广东移动通信有限公司 | Image processing method and device, and computer-readable storage medium |
-
2021
- 2021-05-13 CN CN202110523590.6A patent/CN113312936A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104639952A (en) * | 2015-01-23 | 2015-05-20 | 小米科技有限责任公司 | Method and device for identifying station logo |
WO2019007253A1 (en) * | 2017-07-06 | 2019-01-10 | 阿里巴巴集团控股有限公司 | Image recognition method, apparatus and device, and readable medium |
CN111368572A (en) * | 2018-12-26 | 2020-07-03 | 顺丰科技有限公司 | Two-dimensional code identification method and system |
CN109934041A (en) * | 2019-03-26 | 2019-06-25 | 杭州网易再顾科技有限公司 | Information processing method, information processing system, medium and calculating equipment |
WO2020253119A1 (en) * | 2019-06-18 | 2020-12-24 | 深圳壹账通智能科技有限公司 | Graphic verification code recognizing method and apparatus, readable storage medium, and terminal device |
WO2020259365A1 (en) * | 2019-06-27 | 2020-12-30 | Oppo广东移动通信有限公司 | Image processing method and device, and computer-readable storage medium |
CN110689535A (en) * | 2019-09-29 | 2020-01-14 | 歌尔股份有限公司 | Workpiece identification method and device, electronic equipment and storage medium |
CN110751682A (en) * | 2019-10-28 | 2020-02-04 | 普联技术有限公司 | Method, device, terminal equipment and storage medium for extracting and identifying image |
CN111079613A (en) * | 2019-12-09 | 2020-04-28 | 北京明略软件系统有限公司 | Gesture recognition method and apparatus, electronic device, and storage medium |
CN111191570A (en) * | 2019-12-26 | 2020-05-22 | 国网北京市电力公司 | Image recognition method and device |
Non-Patent Citations (3)
Title |
---|
MAX E. VIZCARRA MELGAR ET AL.: "A High Density Colored 2D-Barcode: CQR Code-9", 《IEEE XPLORE》, 16 January 2017 (2017-01-16) * |
曾子剑: "基于QR二维码编解码技术的研究与实现", 《万方数据库》, 15 February 2011 (2011-02-15) * |
蔡波, 朱玉玉: "车牌识别中的快速区域定位方法研究", 西南科技大学学报, no. 02 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114241537A (en) * | 2021-12-31 | 2022-03-25 | 智慧眼科技股份有限公司 | Finger vein image authenticity identification method and device, computer equipment and storage medium |
CN114241537B (en) * | 2021-12-31 | 2022-12-23 | 智慧眼科技股份有限公司 | Finger vein image authenticity identification method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109753953B (en) | Method and device for positioning text in image, electronic equipment and storage medium | |
CN111461170A (en) | Vehicle image detection method and device, computer equipment and storage medium | |
CN111242126A (en) | Irregular text correction method and device, computer equipment and storage medium | |
CN108154149B (en) | License plate recognition method based on deep learning network sharing | |
CN109447117B (en) | Double-layer license plate recognition method and device, computer equipment and storage medium | |
US11823457B2 (en) | Image recognition method and apparatus, based on context representation, and computer-readable storage medium | |
CN109118476B (en) | Method and device for detecting integrity of edge profile of part | |
CN111912846A (en) | Machine vision-based surface defect and edge burr detection method | |
CN110705560A (en) | Tire text acquisition method and device and tire specification detection method | |
CN114581446B (en) | Battery core abnormity detection method and system of laminated battery | |
CN113312936A (en) | Image positioning identification recognition method and server | |
CN112149713A (en) | Method and device for detecting insulator image based on insulator image detection model | |
CN110288040B (en) | Image similarity judging method and device based on topology verification | |
CN113139399A (en) | Image line frame identification method and server | |
CN107194402A (en) | A kind of parallel thinning framework extraction method | |
CN117058411B (en) | Method, device, medium and equipment for identifying edge appearance flaws of battery | |
CN105374032A (en) | Communicated region marking method | |
CN103544495A (en) | Method and system for recognizing of image categories | |
JP5010627B2 (en) | Character recognition device and character recognition method | |
CN111667463A (en) | Cable detection method, robot and storage device | |
CN116542926A (en) | Method, device, equipment and storage medium for identifying defects of two-dimension codes of battery | |
CN113128247B (en) | Image positioning identification verification method and server | |
CN106650719B (en) | Method and device for identifying picture characters | |
JP5439069B2 (en) | Character recognition device and character recognition method | |
CN111967460A (en) | Text detection method and device, electronic equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |