CN114065798A - Visual identification method and device based on machine identification - Google Patents

Visual identification method and device based on machine identification Download PDF

Info

Publication number
CN114065798A
CN114065798A CN202110200179.5A CN202110200179A CN114065798A CN 114065798 A CN114065798 A CN 114065798A CN 202110200179 A CN202110200179 A CN 202110200179A CN 114065798 A CN114065798 A CN 114065798A
Authority
CN
China
Prior art keywords
data
image
value
gray
template
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
Application number
CN202110200179.5A
Other languages
Chinese (zh)
Inventor
滕元俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Bogong Technology Co ltd
Original Assignee
Hangzhou Bogong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Bogong Technology Co ltd filed Critical Hangzhou Bogong Technology Co ltd
Priority to CN202110200179.5A priority Critical patent/CN114065798A/en
Publication of CN114065798A publication Critical patent/CN114065798A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Library & Information Science (AREA)
  • Databases & Information Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of machine identification test, and particularly relates to a visual identification method and a device based on machine identification, wherein the method comprises the following steps: step 1: acquiring source image data to be identified, and performing gray scanning on the source image data to obtain a gray scanning image; step 2: establishing an image characteristic mapping curve of a gray scanning image; the image feature mapping curve is defined as: a cross-correlation variation curve of a height pixel ratio of the image and a width pixel ratio of the image; the ratio of height pixels of the image is image height/pixel; the width-to-pixel ratio of the image is image width/pixel. The image characteristic mapping curve is obtained through obtaining the gray scanning image of the source image data, the first matching retrieval is carried out based on the image characteristic mapping curve, the fuzzy recognition is equivalently carried out, the secondary recognition is carried out by utilizing the machine learning model according to the fuzzy recognition result, and the recognition accuracy and the recognition efficiency are improved.

Description

Visual identification method and device based on machine identification
Technical Field
The invention belongs to the technical field of machine identification, and particularly relates to a visual identification method and device based on machine identification.
Background
The machine vision system uses a machine to replace human eyes to make various measurements and judgments. The system is an important branch of computer science, integrates the technologies of optics, mechanics, electronics, computer software and hardware and the like, and relates to a plurality of fields of computers, image processing, mode recognition, artificial intelligence, signal processing, optical-mechanical-electrical integration and the like. The rapid development of image processing, pattern recognition and other technologies also greatly promotes the development of machine vision.
The vision system uses a machine to replace human eyes for measurement and judgment. The visual system is that a machine vision product (namely an image shooting device which is divided into a CMOS and a CCD) is used for converting a shot target into an image signal, transmitting the image signal to a special image processing system, and converting the image signal into a digital signal according to information such as pixel distribution, brightness, color and the like; the image system performs various calculations on these signals to extract the features of the target, and then controls the operation of the on-site equipment according to the result of the discrimination. Is a valuable mechanism for production, assembly or packaging. It has immeasurable value in terms of the ability to detect defects and prevent defective products from being distributed to consumers.
Machine vision systems are characterized by increased production flexibility and automation. In some dangerous working environments which are not suitable for manual operation or occasions which are difficult for manual vision to meet the requirements, machine vision is commonly used to replace the manual vision; meanwhile, in the process of mass industrial production, the efficiency of checking the product quality by using manual vision is low, the precision is not high, and the production efficiency and the automation degree of production can be greatly improved by using a machine vision detection method. And the machine vision is easy to realize information integration, and is a basic technology for realizing computer integrated manufacturing. The product can be measured, guided, detected and identified on the fastest production line, and the production task can be finished with guaranteed quality and quantity.
Disclosure of Invention
The invention mainly aims to provide a visual identification method and device based on machine identification, which can obtain an image characteristic mapping curve by obtaining a gray scale scanning image of source image data, perform first matching retrieval based on the image characteristic mapping curve, namely perform fuzzy identification, and perform secondary identification by using a machine learning model according to the result of the fuzzy identification, thereby improving the identification accuracy and the identification efficiency.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of machine-recognition based vision recognition, the method performing the steps of:
step 1: acquiring source image data to be identified, and performing gray scanning on the source image data to obtain a gray scanning image;
step 2: establishing an image characteristic mapping curve of a gray scanning image; the image feature mapping curve is defined as: a cross-correlation variation curve of a height pixel ratio of the image and a width pixel ratio of the image; the ratio of height pixels of the image is image height/pixel; the width pixel ratio of the image is image width/pixel;
and step 3: performing feature extraction on the cross-correlation change curve to obtain a first feature value, and performing data retrieval in a preset feature template database according to the obtained first feature value; the characteristic template database stores characteristic data and image data corresponding to the characteristic data; the process of data retrieval comprises: setting an error threshold, searching feature data in a template database, making absolute value difference between the feature data obtained by searching and a first feature value, comparing the obtained difference value with the set error threshold, and if the difference value is not greater than the error threshold, taking image data corresponding to the searched feature data as template data;
and 4, step 4: identifying the obtained gray scanning image by using a preset identification model to obtain characteristic parameters corresponding to the source image data; then, identifying the obtained template data by using a preset identification model to obtain characteristic parameters corresponding to the template data;
and 5: and carrying out difference matching on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data, calculating a similarity score according to a difference matching result, and taking the template data corresponding to the highest similarity score as a recognition result of the source image data.
Further, the step 1: the method for obtaining the source image data to be recognized and carrying out gray scanning on the source image data to obtain the gray scanning image comprises the following steps: carrying out image binarization on source image data to obtain a binarized image; calculating the mean value and the variance of each edge pixel needing to be processed in the binary image, and determining the preset noise fluctuation value of each edge pixel according to the mean value and the variance; performing two-dimensional discrete cosine transform on the binary image of the first adjacent area of each edge pixel; according to the noise fluctuation value, performing two-dimensional wiener affine transformation on the binary image subjected to the two-dimensional discrete cosine transformation; performing two-dimensional inverse discrete cosine transform on the binary image subjected to the two-dimensional wiener affine transformation to obtain a gray image subjected to the affine transformation of the first adjacent area; extracting affine-transformed pixel values of each edge pixel from the affine-transformed gray-scale image of the first adjacent area, and performing weighted summation on the affine-transformed pixel values of each edge pixel and the original pixel values of the edge pixels to obtain processed pixel values of each edge pixel.
Further, the determining the noise fluctuation value according to the mean and the variance includes: when the variance is larger than a preset second threshold value and the mean value is larger than a preset third threshold value, setting the noise fluctuation value as a first parameter; when the variance is larger than the second threshold and smaller than or equal to a preset fourth threshold, setting the noise fluctuation value as a second parameter; setting the noise fluctuation value as a third parameter when the variance is greater than the fourth threshold; wherein the first parameter, the second parameter and the third parameter satisfy the following relationship: the first parameter < the third parameter < the second parameter.
Further, the step 3: the method for extracting the characteristics of the cross-correlation change curve to obtain the first characteristic value comprises the following steps: reading a cross-correlation change curve; carrying out graying processing on the cross-correlation change curve; carrying out binarization processing on the cross-correlation change curve obtained by the graying processing; calculating the mean value and the variance of coordinates of all data points after binarization in an initial given coordinate system; calculating the main axis direction of data point distribution based on linear transformation; and based on clustering analysis according to the obtained mean value, the variance and the main shaft direction, setting an effective region by taking the coordinate mean value as an initial clustering center and the variance and the main shaft direction as constraint values, further calculating the mean value and the variance of data point coordinates in the effective region to obtain a new clustering center, and iterating in the above way until the distance between the current clustering center and the clustering center obtained by the last calculation is smaller than a set threshold value, and taking the current main shaft direction as a slope to pass through the line feature determined by the coordinate mean value as the extracted line feature.
Further, the method for determining the effective area is as follows: determining a straight line through the currently obtained clustering center by taking the currently obtained main shaft direction as a slope; taking the straight line determined in the step as a reference, arranging two amplification straight lines in parallel towards the inner sides of the edges of the images collected at the two sides of the straight line, and taking the area in the two obtained amplification straight lines as an effective area; wherein, the collective image is a restraint system amplified for the first time, and when the effective area is further determined, the effective area obtained last time is the restraint system.
Further, the method for performing data retrieval in a preset feature template database according to the obtained first feature value includes: selecting clustering centers in a data space to form a clustering center set, and respectively endowing binary codes in a Hamming space to each clustering center to obtain a corresponding binary code set; the data of the data space is unstructured data; the unstructured data comprises images and videos; updating the clustering center set and the clustering center to which the data of the data space belongs according to the obtained binary code set until the data space is aligned with the hamming space, and mapping all the data of the data space to the binary codes corresponding to the clustering center to which the data of the data space belongs to complete Hash coding; retrieving data of the data space based on the completed hash code.
Further, the step 4: identifying the obtained gray scanning image by using a preset identification model to obtain characteristic parameters corresponding to the source image data; and then, identifying the obtained template data by using a preset identification model to obtain the characteristic parameters corresponding to the template data, wherein the method comprises the following steps: acquiring a matrix expression of a gray scanning image, substituting the matrix expression of the gray scanning image into a preset recognition model for recognition, and obtaining characteristic parameters corresponding to source image data; and acquiring a matrix expression of the template data, substituting the matrix expression of the template data into a preset identification model for identification, and acquiring characteristic parameters corresponding to the template data.
Further, the preset recognition model is represented by the following formula:
Figure BDA0002948280530000031
wherein the content of the first and second substances,
Figure BDA0002948280530000032
m is the image width of the gray scanning image or the template data for identifying the obtained characteristic parameters; n is the image height of the gray-scale scan image or the template data, K is the number of pixels of the gray-scale scan image or the template data, and W is [ W1, W2, W3, …, WK ═ W]As the weights of the neurons in the output layer, a ═ a1, a2, a3 … a20]Exp is index e, x (n) is matrix expression of gray scale scanning image or template data; t denotes a transposition operation of the sequence.
Further, the step 5: the method for carrying out difference matching on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data, calculating the similarity score according to the result of the difference matching, and taking the corresponding template data with the highest similarity score as the recognition result of the source image data comprises the following steps: carrying out difference duplication elimination on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data; the method for removing the duplicate of the difference value comprises the following steps: obtaining a difference value after the difference between the two characteristic parameters is carried out, removing the corresponding value of the difference value within the range of the set threshold value, keeping the corresponding value of the difference value exceeding the set threshold value, and counting the number of the kept values, wherein the more the kept values are, the lower the similarity score is; the fewer the retention values, the higher the similarity score.
A visual recognition device based on machine recognition.
The visual identification method and device based on machine identification have the following beneficial effects: the image characteristic mapping curve is obtained through obtaining the gray scanning image of the source image data, the first matching retrieval is carried out based on the image characteristic mapping curve, the fuzzy recognition is equivalently carried out, the secondary recognition is carried out by utilizing the machine learning model according to the fuzzy recognition result, and the recognition accuracy and the recognition efficiency are improved. The method is mainly realized by the following steps: 1. and (3) extracting the characteristics of the cross-correlation change curve: the method has the advantages that the template data close to the source image data to be recognized can be found with less resource occupancy rate so as to improve the efficiency and accuracy of subsequent machine recognition; 2. establishing a recognition model: in the process of establishing an identification model, a matrix expression of a gray scanning image is obtained, and the matrix expression of the gray scanning image is substituted into a preset identification model for identification to obtain characteristic parameters corresponding to source image data; the method comprises the steps of obtaining a matrix expression of template data, substituting the matrix expression of the template data into a preset identification model for identification, and obtaining characteristic parameters corresponding to the template data, so that the identification of the image can be converted into the contrast identification of the characteristic parameters, and the identification efficiency is improved; 3. retrieval of template data: the method comprises the steps of selecting clustering centers in a data space to form a clustering center set, and respectively endowing binary codes in a Hamming space to each clustering center to obtain a corresponding binary code set; the data of the data space is unstructured data; the unstructured data comprises images and videos; updating the clustering center set and the clustering center to which the data of the data space belongs according to the obtained binary code set until the data space is aligned with the hamming space, and mapping all the data of the data space to the binary codes corresponding to the clustering center to which the data of the data space belongs to complete Hash coding; and retrieving the data in the data space based on the completed hash code, so that the retrieval efficiency can be improved.
Drawings
Fig. 1 is a schematic flow chart of a method of a machine-recognition-based visual recognition method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an image characteristic curve of a gray-scale scanned image according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a method of a machine-recognition-based visual recognition method according to an embodiment of the present invention;
fig. 4 is a graph diagram illustrating a variation of error ratio of a recognition result according to the number of experiments in the visual recognition method based on machine recognition according to the embodiment of the present invention and a comparison experiment effect diagram in the prior art.
Detailed Description
The technical solution of the present invention is further described in detail below with reference to the following detailed description and the accompanying drawings:
example 1
As shown in fig. 1, a visual recognition method based on machine recognition, the method performs the following steps:
step 1: acquiring source image data to be identified, and performing gray scanning on the source image data to obtain a gray scanning image;
step 2: establishing an image characteristic mapping curve of a gray scanning image; the image feature mapping curve is defined as: a cross-correlation variation curve of a height pixel ratio of the image and a width pixel ratio of the image; the ratio of height pixels of the image is image height/pixel; the width pixel ratio of the image is image width/pixel;
and step 3: performing feature extraction on the cross-correlation change curve to obtain a first feature value, and performing data retrieval in a preset feature template database according to the obtained first feature value; the characteristic template database stores characteristic data and image data corresponding to the characteristic data; the process of data retrieval comprises: setting an error threshold, searching feature data in a template database, making absolute value difference between the feature data obtained by searching and a first feature value, comparing the obtained difference value with the set error threshold, and if the difference value is not greater than the error threshold, taking image data corresponding to the searched feature data as template data;
and 4, step 4: identifying the obtained gray scanning image by using a preset identification model to obtain characteristic parameters corresponding to the source image data; then, identifying the obtained template data by using a preset identification model to obtain characteristic parameters corresponding to the template data;
and 5: and carrying out difference matching on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data, calculating a similarity score according to a difference matching result, and taking the template data corresponding to the highest similarity score as a recognition result of the source image data.
Specifically, by adopting the technical scheme, the image characteristic mapping curve is obtained by obtaining the gray scale scanning image of the source image data, the first matching retrieval is carried out based on the image characteristic mapping curve, which is equivalent to fuzzy recognition, and the secondary recognition is carried out by utilizing the machine learning model according to the fuzzy recognition result, so that the recognition accuracy and the recognition efficiency are improved. The method is mainly realized by the following steps: 1. and (3) extracting the characteristics of the cross-correlation change curve: the method has the advantages that the template data close to the source image data to be recognized can be found with less resource occupancy rate so as to improve the efficiency and accuracy of subsequent machine recognition; 2. establishing a recognition model: in the process of establishing an identification model, a matrix expression of a gray scanning image is obtained, and the matrix expression of the gray scanning image is substituted into a preset identification model for identification to obtain characteristic parameters corresponding to source image data; the method comprises the steps of obtaining a matrix expression of template data, substituting the matrix expression of the template data into a preset identification model for identification, and obtaining characteristic parameters corresponding to the template data, so that the identification of the image can be converted into the contrast identification of the characteristic parameters, and the identification efficiency is improved; 3. retrieval of template data: the method comprises the steps of selecting clustering centers in a data space to form a clustering center set, and respectively endowing binary codes in a Hamming space to each clustering center to obtain a corresponding binary code set; the data of the data space is unstructured data; the unstructured data comprises images and videos; updating the clustering center set and the clustering center to which the data of the data space belongs according to the obtained binary code set until the data space is aligned with the hamming space, and mapping all the data of the data space to the binary codes corresponding to the clustering center to which the data of the data space belongs to complete Hash coding; and retrieving the data in the data space based on the completed hash code, so that the retrieval efficiency can be improved.
Example 2
On the basis of the above embodiment, the step 1: the method for obtaining the source image data to be recognized and carrying out gray scanning on the source image data to obtain the gray scanning image comprises the following steps: carrying out image binarization on source image data to obtain a binarized image; calculating the mean value and the variance of each edge pixel needing to be processed in the binary image, and determining the preset noise fluctuation value of each edge pixel according to the mean value and the variance; performing two-dimensional discrete cosine transform on the binary image of the first adjacent area of each edge pixel; according to the noise fluctuation value, performing two-dimensional wiener affine transformation on the binary image subjected to the two-dimensional discrete cosine transformation; performing two-dimensional inverse discrete cosine transform on the binary image subjected to the two-dimensional wiener affine transformation to obtain a gray image subjected to the affine transformation of the first adjacent area; extracting affine-transformed pixel values of each edge pixel from the affine-transformed gray-scale image of the first adjacent area, and performing weighted summation on the affine-transformed pixel values of each edge pixel and the original pixel values of the edge pixels to obtain processed pixel values of each edge pixel.
In particular, the essence of the wiener filtering is to minimize the mean square of the estimation error (defined as the difference between the desired response and the actual output of the filter). Discrete-time wiener filtering theory evolved from the pioneering work of wiener on linear optimal filters of continuous-time signals. The importance of the wiener filter is that it provides a frame of reference for linear filtering of the generalized stationary random signal.
Affine transformation, also called affine mapping, refers to a geometric transformation in which one vector space is linearly transformed and then translated into another vector space.
Affine transformation is geometrically defined as an affine transformation or affine mapping (from latin, "affine," and … related ") between two vector spaces consisting of a non-singular linear transformation (transformation performed using a linear function) followed by a translation transformation.
In the case of finite dimensions, each affine transformation can be given by a matrix a and a vector b, which can be written as a and an additional column b. An affine transformation corresponds to a multiplication of a matrix and a vector, while a complex of affine transformations corresponds to a normal matrix multiplication, provided that an additional row is added underneath the matrix, this row being all 0 except for the rightmost one being a1, while the column vector is underneath with a 1.
The wiener affine transformation is affine transformation performed on the basis of wiener filtering.
Example 3
On the basis of the above embodiment, said determining said noise fluctuation value according to the mean and the variance comprises: when the variance is larger than a preset second threshold value and the mean value is larger than a preset third threshold value, setting the noise fluctuation value as a first parameter; when the variance is larger than the second threshold and smaller than or equal to a preset fourth threshold, setting the noise fluctuation value as a second parameter; setting the noise fluctuation value as a third parameter when the variance is greater than the fourth threshold; wherein the first parameter, the second parameter and the third parameter satisfy the following relationship: the first parameter < the third parameter < the second parameter.
Specifically, image noise refers to unnecessary or redundant interference information present in the image data. The presence of noise seriously affects the quality of the remotely sensed image and must therefore be corrected before image enhancement and classification processes. Various factors in an image that hinder one's acceptance of its information may be referred to as image noise. Noise can be theoretically defined as "random error that is unpredictable and can only be recognized by probabilistic statistical methods". It is therefore appropriate to consider the image noise as a multi-dimensional random process, so that the method of describing the noise can be completely borrowed from the description of the random process, i.e. its probability distribution function and probability density distribution function
Example 4
On the basis of the above embodiment, the step 3: the method for extracting the characteristics of the cross-correlation change curve to obtain the first characteristic value comprises the following steps: reading a cross-correlation change curve; carrying out graying processing on the cross-correlation change curve; carrying out binarization processing on the cross-correlation change curve obtained by the graying processing; calculating the mean value and the variance of coordinates of all data points after binarization in an initial given coordinate system; calculating the main axis direction of data point distribution based on linear transformation; and based on clustering analysis according to the obtained mean value, the variance and the main shaft direction, setting an effective region by taking the coordinate mean value as an initial clustering center and the variance and the main shaft direction as constraint values, further calculating the mean value and the variance of data point coordinates in the effective region to obtain a new clustering center, and iterating in the above way until the distance between the current clustering center and the clustering center obtained by the last calculation is smaller than a set threshold value, and taking the current main shaft direction as a slope to pass through the line feature determined by the coordinate mean value as the extracted line feature.
In particular, cluster analysis refers to an analytical process that groups a collection of physical or abstract objects into classes that are composed of similar objects. It is an important human behavior.
The goal of cluster analysis is to collect data on a similar basis for classification. Clustering is derived from many fields, including mathematics, computer science, statistics, biology and economics. In different application fields, many clustering techniques have been developed, and these techniques are used to describe data, measure the similarity between different data sources, and classify data sources into different clusters.
Example 5
On the basis of the above embodiment, the method for determining the effective area is as follows: determining a straight line through the currently obtained clustering center by taking the currently obtained main shaft direction as a slope; taking the straight line determined in the step as a reference, arranging two amplification straight lines in parallel towards the inner sides of the edges of the images collected at the two sides of the straight line, and taking the area in the two obtained amplification straight lines as an effective area; wherein, the collective image is a restraint system amplified for the first time, and when the effective area is further determined, the effective area obtained last time is the restraint system.
Specifically, a complete image is composed of three channels, namely red, green and blue. The scaled views of the three red, green and blue channels are all displayed in grayscale. The specific gravity of red, green and blue in the image is represented by different gray scale levels. Pure white in the channel, representing the color light at the highest brightness here, the brightness level is 255.
The channel is the basis for the entire Photoshop display image. The color variation is actually an indirect adjustment of the channel gray map. The channel is the core of the Photoshop processed image, around which all color adjustment tools are used.
In the computer field, such images are typically displayed as shades of gray from the darkest black to the brightest white, although in theory this sampling could be different shades of any color, and even different colors at different brightnesses. The gray image is different from the black and white image, and the black and white image only has two colors of black and white in the field of computer image; grayscale images also have many levels of color depth between black and white. However, outside the field of digital images, a "black-and-white image" also means a "grayscale image", and for example, a photograph of grayscale is generally called a "black-and-white photograph". Monochrome images are equivalent to grayscale images in some articles on digital images and to black and white images in other articles.
Example 6
On the basis of the above embodiment, the method for performing data retrieval in a preset feature template database according to the obtained first feature value includes: selecting clustering centers in a data space to form a clustering center set, and respectively endowing binary codes in a Hamming space to each clustering center to obtain a corresponding binary code set; the data of the data space is unstructured data; the unstructured data comprises images and videos; updating the clustering center set and the clustering center to which the data of the data space belongs according to the obtained binary code set until the data space is aligned with the hamming space, and mapping all the data of the data space to the binary codes corresponding to the clustering center to which the data of the data space belongs to complete Hash coding; retrieving data of the data space based on the completed hash code.
In particular, the method comprises the following steps of,
example 7
On the basis of the above embodiment, the step 4: identifying the obtained gray scanning image by using a preset identification model to obtain characteristic parameters corresponding to the source image data; and then, identifying the obtained template data by using a preset identification model to obtain the characteristic parameters corresponding to the template data, wherein the method comprises the following steps: acquiring a matrix expression of a gray scanning image, substituting the matrix expression of the gray scanning image into a preset recognition model for recognition, and obtaining characteristic parameters corresponding to source image data; and acquiring a matrix expression of the template data, substituting the matrix expression of the template data into a preset identification model for identification, and acquiring characteristic parameters corresponding to the template data.
Example 9
On the basis of the previous embodiment, the preset recognition model is represented by the following formula:
Figure BDA0002948280530000091
Figure BDA0002948280530000092
wherein the content of the first and second substances,
Figure BDA0002948280530000093
m is the image width of the gray scanning image or the template data for identifying the obtained characteristic parameters; n is the image height of the gray-scale scan image or the template data, K is the number of pixels of the gray-scale scan image or the template data, and W is [ W1, W2, W3, …, WK ═ W]As the weights of the neurons in the output layer, a ═ a1, a2, a3 … a20]Exp is index e, x (n) is matrix expression of gray scale scanning image or template data;t denotes a transposition operation of the sequence.
Specifically, the artificial neural network is substantially similar to an abnormally complex network of neurons, and is formed by interconnecting individual units, each of which has an input and an output of numerical quantities, in the form of a real number or a linear combinatorial function. It must first learn with a learning criterion before it can do its job. When the network judges an error, it reduces the possibility of making the same error by learning. The method has strong generalization capability and nonlinear mapping capability, and can perform model processing on a system with small information quantity. The function simulation point of view has parallelism and the information transmission speed is very fast.
Example 10
On the basis of the above embodiment, the step 5: the method for carrying out difference matching on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data, calculating the similarity score according to the result of the difference matching, and taking the corresponding template data with the highest similarity score as the recognition result of the source image data comprises the following steps: carrying out difference duplication elimination on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data; the method for removing the duplicate of the difference value comprises the following steps: obtaining a difference value after the difference between the two characteristic parameters is carried out, removing the corresponding value of the difference value within the range of the set threshold value, keeping the corresponding value of the difference value exceeding the set threshold value, and counting the number of the kept values, wherein the more the kept values are, the lower the similarity score is; the fewer the retention values, the higher the similarity score.
A visual recognition device based on machine recognition.
The above description is only an embodiment of the present invention, but not intended to limit the scope of the present invention, and any structural changes made according to the present invention should be considered as being limited within the scope of the present invention without departing from the spirit of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and related description of the system described above may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.
It should be noted that, the system provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the modules or steps in the embodiment of the present invention are further decomposed or combined, for example, the modules in the foregoing embodiment may be combined into one module, or may be further split into multiple sub-modules, so as to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not to be construed as unduly limiting the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and related descriptions of the storage device and the processing device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Those of skill in the art would appreciate that the various illustrative modules, method steps, and modules described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that programs corresponding to the software modules, method steps may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing or implying a particular order or sequence.
The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

1. Visual recognition method based on machine recognition, characterized in that it performs the following steps:
step 1: acquiring source image data to be identified, and performing gray scanning on the source image data to obtain a gray scanning image;
step 2: establishing an image characteristic mapping curve of a gray scanning image; the image feature mapping curve is defined as: a cross-correlation variation curve of a height pixel ratio of the image and a width pixel ratio of the image; the ratio of height pixels of the image is image height/pixel; the width pixel ratio of the image is image width/pixel;
and step 3: performing feature extraction on the cross-correlation change curve to obtain a first feature value, and performing data retrieval in a preset feature template database according to the obtained first feature value; the characteristic template database stores characteristic data and image data corresponding to the characteristic data; the process of data retrieval comprises: setting an error threshold, searching feature data in a template database, making absolute value difference between the feature data obtained by searching and a first feature value, comparing the obtained difference value with the set error threshold, and if the difference value is not greater than the error threshold, taking image data corresponding to the searched feature data as template data;
and 4, step 4: identifying the obtained gray scanning image by using a preset identification model to obtain characteristic parameters corresponding to the source image data; then, identifying the obtained template data by using a preset identification model to obtain characteristic parameters corresponding to the template data;
and 5: and carrying out difference matching on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data, calculating a similarity score according to a difference matching result, and taking the template data corresponding to the highest similarity score as a recognition result of the source image data.
2. The method of claim 1, wherein the step 1: the method for obtaining the source image data to be recognized and carrying out gray scanning on the source image data to obtain the gray scanning image comprises the following steps: carrying out image binarization on source image data to obtain a binarized image; calculating the mean value and the variance of each edge pixel needing to be processed in the binary image, and determining the preset noise fluctuation value of each edge pixel according to the mean value and the variance; performing two-dimensional discrete cosine transform on the binary image of the first adjacent area of each edge pixel; according to the noise fluctuation value, performing two-dimensional wiener affine transformation on the binary image subjected to the two-dimensional discrete cosine transformation; performing two-dimensional inverse discrete cosine transform on the binary image subjected to the two-dimensional wiener affine transformation to obtain a gray image subjected to the affine transformation of the first adjacent area; extracting affine-transformed pixel values of each edge pixel from the affine-transformed gray-scale image of the first adjacent area, and performing weighted summation on the affine-transformed pixel values of each edge pixel and the original pixel values of the edge pixels to obtain processed pixel values of each edge pixel.
3. The method of claim 2, wherein the determining the noise fluctuation value from the mean and the variance comprises: when the variance is larger than a preset second threshold value and the mean value is larger than a preset third threshold value, setting the noise fluctuation value as a first parameter; when the variance is larger than the second threshold and smaller than or equal to a preset fourth threshold, setting the noise fluctuation value as a second parameter; setting the noise fluctuation value as a third parameter when the variance is greater than the fourth threshold; wherein the first parameter, the second parameter and the third parameter satisfy the following relationship: the first parameter < the third parameter < the second parameter.
4. The method of claim 3, wherein step 3: the method for extracting the characteristics of the cross-correlation change curve to obtain the first characteristic value comprises the following steps: reading a cross-correlation change curve; carrying out graying processing on the cross-correlation change curve; carrying out binarization processing on the cross-correlation change curve obtained by the graying processing; calculating the mean value and the variance of coordinates of all data points after binarization in an initial given coordinate system; calculating the main axis direction of data point distribution based on linear transformation; and based on clustering analysis according to the obtained mean value, the variance and the main shaft direction, setting an effective region by taking the coordinate mean value as an initial clustering center and the variance and the main shaft direction as constraint values, further calculating the mean value and the variance of data point coordinates in the effective region to obtain a new clustering center, and iterating in the above way until the distance between the current clustering center and the clustering center obtained by the last calculation is smaller than a set threshold value, and taking the current main shaft direction as a slope to pass through the line feature determined by the coordinate mean value as the extracted line feature.
5. The method of claim 4, wherein the determination of the active area is by: determining a straight line through the currently obtained clustering center by taking the currently obtained main shaft direction as a slope; taking the straight line determined in the step as a reference, arranging two amplification straight lines in parallel towards the inner sides of the edges of the images collected at the two sides of the straight line, and taking the area in the two obtained amplification straight lines as an effective area; wherein, the collective image is a restraint system amplified for the first time, and when the effective area is further determined, the effective area obtained last time is the restraint system.
6. The method of claim 5, wherein the retrieving data in the predetermined feature template database according to the obtained first feature value comprises: selecting clustering centers in a data space to form a clustering center set, and respectively endowing binary codes in a Hamming space to each clustering center to obtain a corresponding binary code set; the data of the data space is unstructured data; the unstructured data comprises images and videos; updating the clustering center set and the clustering center to which the data of the data space belongs according to the obtained binary code set until the data space is aligned with the hamming space, and mapping all the data of the data space to the binary codes corresponding to the clustering center to which the data of the data space belongs to complete Hash coding; retrieving data of the data space based on the completed hash code.
7. The method of claim 6, wherein the step 4: identifying the obtained gray scanning image by using a preset identification model to obtain characteristic parameters corresponding to the source image data; and then, identifying the obtained template data by using a preset identification model to obtain the characteristic parameters corresponding to the template data, wherein the method comprises the following steps: acquiring a matrix expression of a gray scanning image, substituting the matrix expression of the gray scanning image into a preset recognition model for recognition, and obtaining characteristic parameters corresponding to source image data; and acquiring a matrix expression of the template data, substituting the matrix expression of the template data into a preset identification model for identification, and acquiring characteristic parameters corresponding to the template data.
8. The method of claim 7, wherein the predetermined recognition model is expressed using the following formula:
Figure FDA0002948280520000021
Figure FDA0002948280520000022
wherein the content of the first and second substances,
Figure FDA0002948280520000023
m is the image width of the gray scanning image or the template data for identifying the obtained characteristic parameters; n is the image height of the gray-scale scan image or the template data, K is the number of pixels of the gray-scale scan image or the template data, and W is [ W1, W2, W3, …, WK ═ W]As the weights of the neurons in the output layer, a ═ a1, a2, a3 … a20]Exp is index e, x (n) is matrix expression of gray scale scanning image or template data; t denotes a transposition operation of the sequence.
9. The method of claim 8, wherein the step 5: the method for carrying out difference matching on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data, calculating the similarity score according to the result of the difference matching, and taking the corresponding template data with the highest similarity score as the recognition result of the source image data comprises the following steps: carrying out difference duplication elimination on the characteristic parameters corresponding to the source image data and the characteristic parameters corresponding to the template data; the method for removing the duplicate of the difference value comprises the following steps: obtaining a difference value after the difference between the two characteristic parameters is carried out, removing the corresponding value of the difference value within the range of the set threshold value, keeping the corresponding value of the difference value exceeding the set threshold value, and counting the number of the kept values, wherein the more the kept values are, the lower the similarity score is; the fewer the retention values, the higher the similarity score.
10. A machine-recognition-based visual recognition apparatus based on the method of any one of claims 1 to 9.
CN202110200179.5A 2021-02-23 2021-02-23 Visual identification method and device based on machine identification Pending CN114065798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110200179.5A CN114065798A (en) 2021-02-23 2021-02-23 Visual identification method and device based on machine identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110200179.5A CN114065798A (en) 2021-02-23 2021-02-23 Visual identification method and device based on machine identification

Publications (1)

Publication Number Publication Date
CN114065798A true CN114065798A (en) 2022-02-18

Family

ID=80233268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110200179.5A Pending CN114065798A (en) 2021-02-23 2021-02-23 Visual identification method and device based on machine identification

Country Status (1)

Country Link
CN (1) CN114065798A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240807A (en) * 2022-02-28 2022-03-25 山东慧丰花生食品股份有限公司 Peanut aflatoxin detection method and system based on machine vision
CN114494985A (en) * 2022-04-18 2022-05-13 山东西曼克技术有限公司 Logistics transfer robot work abnormity detection method and system based on image processing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942526A (en) * 2014-01-17 2014-07-23 山东省科学院情报研究所 Linear feature extraction method for discrete data point set
CN104217416A (en) * 2013-05-31 2014-12-17 富士通株式会社 Grayscale image processing method and device
CN107341178A (en) * 2017-05-24 2017-11-10 北京航空航天大学 A kind of adaptive binary quantization Hash coding method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217416A (en) * 2013-05-31 2014-12-17 富士通株式会社 Grayscale image processing method and device
CN103942526A (en) * 2014-01-17 2014-07-23 山东省科学院情报研究所 Linear feature extraction method for discrete data point set
CN107341178A (en) * 2017-05-24 2017-11-10 北京航空航天大学 A kind of adaptive binary quantization Hash coding method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240807A (en) * 2022-02-28 2022-03-25 山东慧丰花生食品股份有限公司 Peanut aflatoxin detection method and system based on machine vision
CN114240807B (en) * 2022-02-28 2022-05-17 山东慧丰花生食品股份有限公司 Peanut aflatoxin detection method and system based on machine vision
CN114494985A (en) * 2022-04-18 2022-05-13 山东西曼克技术有限公司 Logistics transfer robot work abnormity detection method and system based on image processing
CN114494985B (en) * 2022-04-18 2022-07-19 山东西曼克技术有限公司 Logistics transfer robot work abnormity detection method and system based on image processing

Similar Documents

Publication Publication Date Title
CN111383209B (en) Unsupervised flaw detection method based on full convolution self-encoder network
EP0363828A2 (en) Method and apparatus for adaptive learning type general purpose image measurement and recognition
CN108921120B (en) Cigarette identification method suitable for wide retail scene
CN112233067A (en) Hot rolled steel coil end face quality detection method and system
CN112307919B (en) Improved YOLOv 3-based digital information area identification method in document image
CN101140216A (en) Gas-liquid two-phase flow type recognition method based on digital graphic processing technique
CN110490924B (en) Light field image feature point detection method based on multi-scale Harris
CN114065798A (en) Visual identification method and device based on machine identification
CN112464983A (en) Small sample learning method for apple tree leaf disease image classification
CN111666852A (en) Micro-expression double-flow network identification method based on convolutional neural network
CN116910752B (en) Malicious code detection method based on big data
CN111931700A (en) Corn variety authenticity identification method and identification system based on multiple classifiers
CN116188756A (en) Instrument angle correction and indication recognition method based on deep learning
CN112381751A (en) Online intelligent detection system and method based on image processing algorithm
CN110321890B (en) Digital instrument identification method of power inspection robot
CN111291712B (en) Forest fire recognition method and device based on interpolation CN and capsule network
CN116312860B (en) Agricultural product soluble solid matter prediction method based on supervised transfer learning
CN109829511B (en) Texture classification-based method for detecting cloud layer area in downward-looking infrared image
CN114742849B (en) Leveling instrument distance measuring method based on image enhancement
Dhanuja et al. Areca nut disease detection using image processing technology
CN111582099B (en) Identity verification method based on iris far-source feature traffic operation decision
CN111507177B (en) Identification method and device for metering turnover cabinet
CN113011506A (en) Texture image classification method based on depth re-fractal spectrum network
Ren et al. Sar image data enhancement method based on emd
CN117315670B (en) Water meter reading area detection method based on computer vision

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