CN112364844B - Data acquisition method and system based on computer vision technology - Google Patents

Data acquisition method and system based on computer vision technology Download PDF

Info

Publication number
CN112364844B
CN112364844B CN202110032387.9A CN202110032387A CN112364844B CN 112364844 B CN112364844 B CN 112364844B CN 202110032387 A CN202110032387 A CN 202110032387A CN 112364844 B CN112364844 B CN 112364844B
Authority
CN
China
Prior art keywords
image
data
training
acquiring
target object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110032387.9A
Other languages
Chinese (zh)
Other versions
CN112364844A (en
Inventor
王兆君
金震
张京日
康进港
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing SunwayWorld Science and Technology Co Ltd
Original Assignee
Beijing SunwayWorld Science and 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 Beijing SunwayWorld Science and Technology Co Ltd filed Critical Beijing SunwayWorld Science and Technology Co Ltd
Priority to CN202110032387.9A priority Critical patent/CN112364844B/en
Publication of CN112364844A publication Critical patent/CN112364844A/en
Application granted granted Critical
Publication of CN112364844B publication Critical patent/CN112364844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • 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/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Abstract

The invention provides a data acquisition method and a system based on a computer vision technology, which comprises the following steps: acquiring a target object identified by a computer, and photographing the target object to acquire a target image; training a target image in a preset convolutional neural network, and storing a training result into a data acquisition model; based on the data acquisition model of the computer vision technology, the data of the target image is identified, analyzed and acquired; by acquiring the target image and training through the convolutional neural network, accurate and efficient data analysis and acquisition can be effectively realized through a computer vision technology and a data acquisition model based on a training result.

Description

Data acquisition method and system based on computer vision technology
Technical Field
The invention relates to the technical field of computer vision, in particular to a data acquisition method and system based on a computer vision technology.
Background
Image data acquisition is an intelligent detection technology for detecting an object to be detected by acquiring and analyzing image data of the object to be detected.
However, the acquisition of image data is usually acquired manually, which not only results in long data acquisition time, low efficiency, but also results in high labor cost and low accuracy of the acquired image data.
Disclosure of Invention
The invention provides a data acquisition method and a data acquisition system based on a computer vision technology, which are used for accurately analyzing and acquiring data of a target image through the computer vision technology.
The invention provides a data acquisition method based on a computer vision technology, which comprises the following steps:
acquiring a target object identified by a computer, and photographing the target object to acquire a target image;
training the target image in a preset convolutional neural network, and storing a training result into a data acquisition model;
and identifying, analyzing and collecting the data of the target image based on a computer vision technology and the data collection model.
Preferably, after the target object identified by the computer is obtained and before the photographing and sampling of the target object, the data acquisition method based on the computer vision technology further includes:
determining effective information of the target object based on the gray matrix texture, and determining the position characteristic of the target object based on an Euclidean distance mapping method;
preprocessing the position characteristics of the target object and the effective information to acquire processing information;
establishing an analysis file, and analyzing and processing the processing information by using the analysis file so as to mark each element point in the target object;
marking each element point in the target object to obtain a marking result of the element point;
evaluating the marking result of the element points based on a preset evaluation index, and acquiring an evaluation result;
meanwhile, based on the evaluation result, the target object is subjected to area delineation, and the delineated target object is photographed through the computer to obtain the target image.
Preferably, a data acquisition method based on computer vision technology,
the valid information includes: the color of the target object, the texture window of the target object, the target angle, the target gray texture and the color texture feature.
Preferably, a data acquisition method based on computer vision technology, after the target object is photographed, further includes:
acquiring an initial image of the target object, acquiring a gray value of each pixel in the initial image, and acquiring a gray matrix based on the gray value;
extracting the gray distribution trend of the row/column of the gray matrix, and acquiring a balance weight array of the initial image according to the gray distribution trend;
correcting the gray matrix based on the balance weight number to obtain an initial gray image;
acquiring M classification sets and a filtering parameter corresponding to each classification set;
the classification set is obtained by classifying the gray pixels of the current initial gray image according to a preset classification mode;
filtering each gray pixel of the initial gray image according to the filtering parameters corresponding to the classification set to obtain an initial gray filtering image;
partitioning the initial gray level filtering image to obtain sub image blocks of N initial gray level filtering images;
acquiring the main direction of the texture of the sub image block based on a preset image texture analysis file;
meanwhile, according to a preset algorithm, obtaining gradient values of pixel gray values corresponding to the sub-image blocks in the x direction or the y direction, and calculating an average value of the gradient values in the x direction or the y direction;
meanwhile, a gradient threshold value of the gradient value is obtained, and binarization processing is carried out on the main direction of the texture of the sub-image block based on the gradient threshold value;
taking the average value of the gradient values as a clustering center, and combining the sub-image blocks into a complete binary image according to the clustering center;
removing impurities in the area of the binary image according to a preset area threshold value, and setting the length-width ratio of the binary image;
removing non-strip-shaped impurities in the binary image according to the length-width ratio to obtain a final processed image;
and the final processed image is the target image.
Preferably, a data acquisition method based on computer vision technology, a process of training the target image in a preset convolutional neural network, includes:
acquiring a feature map area in a preset convolutional neural network, extracting a preset size in the feature map area,
dividing the complete region of the target image according to the preset size, and acquiring a plurality of divided independent sub-image regions;
generating the coordinates of each pixel point of the sub-graph area into the relative coordinates of the pixel points at the corresponding position of the feature graph, and acquiring a coordinate channel corresponding to the feature graph;
and carrying out deep learning on the target image with the coordinate channel according to the parameters of the convolutional neural network, and generating a training result containing the characteristic diagram.
Preferably, the working process of storing the training result to the data acquisition model comprises the following steps:
extracting feature data of the target image based on the training result;
analyzing and judging whether redundant data exist in the characteristic data according to a preset algorithm;
if the characteristic data contains redundant data, removing the redundant data in the characteristic data to obtain simplified data;
classifying the simplified data according to a preset format type;
if the characteristic data does not contain redundant data, directly classifying the characteristic data;
sequencing the sorted characteristic data according to data types, and matching the sequenced characteristic data with a matching segment in the data acquisition model;
and storing the characteristic data into the data acquisition model according to the matching result.
Preferably, after the feature data is stored in the data acquisition model, the method for acquiring data based on computer vision technology further includes:
and screening the characteristic data in the data acquisition model based on the current task of acquiring the specific position data of the target object by the computer, and acquiring final data.
Preferably, before the target image is trained in a preset convolutional neural network, the data acquisition method based on a computer vision technology further includes:
based on the target image, acquiring the spatial density of the target image in the convolutional neural network, and meanwhile, constructing a training space of the target image in the convolutional neural network according to the spatial density, wherein the specific working process comprises the following steps:
obtaining a labeled sample set of the target image
Figure 993436DEST_PATH_IMAGE001
Wherein
Figure 491414DEST_PATH_IMAGE002
In order to train the sample to be trained,
Figure 997481DEST_PATH_IMAGE003
is marked corresponding to the training sample, and
Figure 213699DEST_PATH_IMAGE004
Figure 473035DEST_PATH_IMAGE005
to train the number of samples, an
Figure 825519DEST_PATH_IMAGE006
Figure 502488DEST_PATH_IMAGE007
Is as follows
Figure 940423DEST_PATH_IMAGE008
The number of class marks is set to be,
Figure 626619DEST_PATH_IMAGE008
is the number of categories;
based on the set of labeled samples
Figure 708976DEST_PATH_IMAGE001
Obtaining the set of labeled samples
Figure 822425DEST_PATH_IMAGE001
Sample distance between the i training samples
Figure 747656DEST_PATH_IMAGE009
Wherein, in the step (A),
Figure 971964DEST_PATH_IMAGE010
is shown as
Figure 299040DEST_PATH_IMAGE005
A marked sample
Figure 957292DEST_PATH_IMAGE002
To the first
Figure 104240DEST_PATH_IMAGE011
A marked sample
Figure 132239DEST_PATH_IMAGE012
The distance between them;
to pair
Figure 313821DEST_PATH_IMAGE005
Sample distance between the training samples
Figure 769073DEST_PATH_IMAGE009
Arranged in ascending order to obtain
Figure 544262DEST_PATH_IMAGE013
Wherein, 1, 2.. M,indicates that the sequence samples sequentially increase, and
Figure 110373DEST_PATH_IMAGE014
is the maximum sample distance;
determining a truncation distance of the training sample based on the ranking result
Figure 146462DEST_PATH_IMAGE015
Figure 772616DEST_PATH_IMAGE016
Wherein the content of the first and second substances,
Figure 894155DEST_PATH_IMAGE015
representing a truncation distance of the training sample;
Figure 640788DEST_PATH_IMAGE017
representing a number of sample points of the training sample;
Figure 796963DEST_PATH_IMAGE018
is a constant with the value range of (0, 1);
truncation distance based on the training sample
Figure 594017DEST_PATH_IMAGE019
And sample distance between the training samples
Figure 202853DEST_PATH_IMAGE009
Acquiring the spatial density of the target image in the convolutional neural network
Figure 110766DEST_PATH_IMAGE020
Figure 121448DEST_PATH_IMAGE021
Wherein the content of the first and second substances,
Figure 964770DEST_PATH_IMAGE020
representing a spatial density of the target image in the convolutional neural network;
Figure 60902DEST_PATH_IMAGE010
to represent
Figure 772506DEST_PATH_IMAGE002
To
Figure 903273DEST_PATH_IMAGE012
A distance therebetween, and
Figure 42130DEST_PATH_IMAGE022
Figure 468301DEST_PATH_IMAGE019
representing a truncation distance of the training sample;
Figure 983596DEST_PATH_IMAGE023
representing the training sample variance;
Figure 968870DEST_PATH_IMAGE024
represents a density threshold;
Figure 278628DEST_PATH_IMAGE025
is an impulse function;
spatial density of the target image in the convolutional neural network
Figure 83773DEST_PATH_IMAGE020
And the density threshold value
Figure 278126DEST_PATH_IMAGE024
Comparing;
if it is
Figure 117906DEST_PATH_IMAGE026
Then determining the training sample
Figure 598565DEST_PATH_IMAGE002
Is a core point;
if it is
Figure 156586DEST_PATH_IMAGE027
And the training sample
Figure 748104DEST_PATH_IMAGE002
Distance of truncation of
Figure 84801DEST_PATH_IMAGE019
Core points exist in the field, then the training sample
Figure 611728DEST_PATH_IMAGE002
Is a boundary point;
if the training sample
Figure 391465DEST_PATH_IMAGE002
Neither core nor boundary points, the training samples
Figure 786675DEST_PATH_IMAGE002
Is a noise point;
and constructing a training space of the target image in the convolutional neural network based on the core points, the boundary points and the noise points.
The invention provides a data acquisition system based on computer vision technology, comprising:
a target image acquisition module: acquiring a target object identified by a computer, and photographing the target object based on a computer vision technology to acquire a target image;
a training module: training the target image in a preset convolutional neural network, and storing a training result into a data acquisition model;
a data acquisition module: and acquiring the data of the target image based on the data acquisition model.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a data collection method based on computer vision technology according to an embodiment of the present invention;
fig. 2 is a structural diagram of a data acquisition system based on computer vision technology in an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
Example 1:
the invention provides a data acquisition method based on a computer vision technology, as shown in fig. 1, comprising the following steps:
step 1: acquiring a target object identified by a computer, and photographing the target object to acquire a target image;
step 2: training the target image in a preset convolutional neural network, and storing a training result into a data acquisition model;
and step 3: and identifying, analyzing and collecting the data of the target image based on a computer vision technology and the data collection model.
In this embodiment, the convolutional neural network is a feedforward neural network, and the artificial neuron can respond to the surrounding units and can perform large-scale image processing. The convolutional neural network comprises a convolutional layer and a pooling layer, wherein the convolutional neural network can be of a one-dimensional convolutional neural network, a two-dimensional convolutional neural network or a three-dimensional convolutional neural network.
In this embodiment, the image data is identified and analyzed mainly by analyzing the pixel and gray scale of the image and the three primary color components of red, green and blue.
In this embodiment, the target object may be a real object, such as a desk, a textbook, etc.;
in this embodiment, the target image may be a target image obtained by photographing a target object.
The beneficial effects of the above technical scheme are:
by acquiring the target image and training through the convolutional neural network, accurate and efficient data analysis and acquisition can be effectively realized through a computer vision technology and a data acquisition model based on a training result.
Example 2:
on the basis of embodiment 1, the present invention provides a data acquisition method based on a computer vision technology, which further includes, after acquiring a target object identified by a computer and before taking a picture of the target object for sampling:
determining effective information of the target object based on the gray matrix texture, and determining the position characteristic of the target object based on an Euclidean distance mapping method;
preprocessing the position characteristics of the target object and the effective information to acquire processing information;
establishing an analysis file, and analyzing and processing the processing information by using the analysis file so as to mark each element point in the target object;
marking each element point in the target object to obtain a marking result of the element point;
evaluating the marking result of the element points based on a preset evaluation index, and acquiring an evaluation result;
meanwhile, based on the evaluation result, the target object is subjected to area delineation, and the delineated target object is photographed through the computer to obtain the target image.
In this embodiment, the valid information includes: color of the target object, texture window of the target object, target angle, target gray-scale texture, and color texture features.
In this embodiment, the euclidean distance mapping method may be that for a binary image, where we assume white as foreground color and black as background color, the value of the pixel in the foreground is converted into the distance from the point to the nearest background point, so that the position feature of the target object can be determined;
in this embodiment, the position feature may be the posture of the target object and the proportion of the photo space occupied by the target object.
In this embodiment, the effective information is preprocessed mainly to remove interference information of the effective information, and the effective information is converted into information that can be recognized by the analysis file.
In this embodiment, the analysis file may be a data packet of file processing, where the data types included in the data packet include int type, float type, string type, and the like.
In this embodiment, the evaluation index is used to evaluate the marking result of the element point, and the index is used to measure whether the marking result of the element point is accurate.
In this embodiment, the element points are determined based on the position of the target object, and for example, the position of the target object may be in a hospital acquisition room or the like.
In this embodiment, the marking result may be a marking result based on the determined position after the element point is marked.
In this embodiment, the area delineation of the target object may be performed by delineating an effective image, for example, the target object includes: books and pencils, and ultimately books, need to be circled to obtain the final target image.
The beneficial effects of the above technical scheme are:
the position characteristics of the target object can be accurately determined by determining the effective information of the target object and the Euclidean distance mapping method, and the target image is positioned by analyzing and evaluating, so that the target object is photographed and sampled.
Example 3:
on the basis of the embodiment 2, the invention provides a data acquisition method based on computer vision technology,
the valid information includes: the color of the target object, the texture window of the target object, the target angle, the target gray texture and the color texture feature.
The beneficial effects of the above technical scheme are:
the target object can be accurately analyzed by acquiring the effective information, and the high efficiency of acquiring the target image is realized.
Example 4:
on the basis of embodiment 1, the present invention provides a data acquisition method based on a computer vision technology, wherein after the target object is photographed, the method further includes:
acquiring an initial image of the target object, acquiring a gray value of each pixel in the initial image, and acquiring a gray matrix based on the gray value;
extracting the gray distribution trend of the row/column of the gray matrix, and acquiring a balance weight array of the initial image according to the gray distribution trend;
correcting the gray matrix based on the balance weight number to obtain an initial gray image;
acquiring M classification sets and a filtering parameter corresponding to each classification set;
the classification set is obtained by classifying the gray pixels of the current initial gray image according to a preset classification mode;
filtering each gray pixel of the initial gray image according to the filtering parameters corresponding to the classification set to obtain an initial gray filtering image;
partitioning the initial gray level filtering image to obtain sub image blocks of N initial gray level filtering images;
acquiring the main direction of the texture of the sub image block based on a preset image texture analysis file;
meanwhile, according to a preset algorithm, obtaining gradient values of pixel gray values corresponding to the sub-image blocks in the x direction or the y direction, and calculating an average value of the gradient values in the x direction or the y direction;
meanwhile, a gradient threshold value of the gradient value is obtained, and binarization processing is carried out on the main direction of the texture of the sub-image block based on the gradient threshold value;
taking the average value of the gradient values as a clustering center, and combining the sub-image blocks into a complete binary image according to the clustering center;
removing impurities in the area of the binary image according to a preset area threshold value, and setting the length-width ratio of the binary image;
removing non-strip-shaped impurities in the binary image according to the length-width ratio to obtain a final processed image;
and the final processed image is the target image.
In this embodiment, the gray distribution trend may be a gray distribution trend that is a ratio of black biased to the same saturation to the maximum black among black with different saturations.
In this embodiment, the equalization weight array may be a set formed by equalizing weights of pixels in the image according to different saturation degrees in the gray distribution trend, and the set is an equalization full-weight array.
In this embodiment, the preset classification manner may include at least one of the following manners: classification based on the size of the pixels themselves; m, L are all positive integers based on the classification of the relationship between a pixel and its adjacent L pixels.
In this embodiment, the image texture analysis file may be an image texture analysis file composed of ready-made rich patterns and textures provided by Fireworks (hereinafter, FW).
In this embodiment, the preset algorithm is to obtain a gradient value of a pixel gray value corresponding to the x direction or the y direction of the sub image block; wherein the preset algorithm may be an OTSU algorithm.
In this embodiment, the cluster center may be the cluster center of K-means.
In this embodiment, the gradient threshold refers to a maximum gradient value among the gradient values, and is referred to as a gradient threshold.
In this embodiment, the impurity may be an excess portion exceeding the area threshold, which is referred to as an impurity.
In this embodiment, the non-linear impurities refer to the impurities which are not in the aspect ratio range and are called non-linear.
The beneficial effects of the above technical scheme are:
the method comprises the steps of obtaining a gray level image of an initial image of a target object, carrying out image filtering processing on the gray level image, determining a texture main direction of a sub-image block and a gradient threshold of a pixel gray level value, accurately determining a binary image, and carrying out impurity removal processing on the binary image to accurately obtain the target image, so that the image processing efficiency is improved, and the extraction precision of image data is improved.
Example 5:
on the basis of embodiment 1, the invention provides a data acquisition method based on a computer vision technology, which is a process of training a target image in a preset convolutional neural network, and comprises the following steps:
acquiring a feature map area in a preset convolutional neural network, extracting a preset size in the feature map area,
dividing the complete region of the target image according to the preset size, and acquiring a plurality of divided independent sub-image regions;
generating the coordinates of each pixel point of the sub-graph area into the relative coordinates of the pixel points at the corresponding position of the feature graph, and acquiring a coordinate channel corresponding to the feature graph;
and carrying out deep learning on the target image with the coordinate channel according to the parameters of the convolutional neural network, and generating a training result containing the characteristic diagram.
In this embodiment, the feature map region in the convolutional neural network is a reference map for training the target image, and the target image is placed in the region of the feature map.
In this embodiment, the coordinates of each pixel point in the sub-image region and the relative coordinates of the pixel points at the corresponding positions of the feature map are used to obtain the coordinate channel corresponding to the feature map, so that the deep learning of the target image is facilitated.
In this embodiment, the coordinate channel refers to the coordinate of each pixel point passing through the sub-image region and the relative coordinate of the pixel point at the corresponding position of the feature map, and a gap between the coordinates is referred to as a coordinate channel.
The beneficial effects of the above technical scheme are:
the target image is segmented according to the size of the characteristic image area, so that a plurality of independent sub-images can be acquired, the deep learning of the target image is realized by acquiring the coordinate channel, and the training of the target image is accurately realized.
Example 6:
on the basis of embodiment 1, the invention provides a data acquisition method based on computer vision technology, and the working process of storing the training result to the data acquisition model comprises the following steps:
extracting feature data of the target image based on the training result;
analyzing and judging whether redundant data exist in the characteristic data according to a preset algorithm;
if the characteristic data contains redundant data, removing the redundant data in the characteristic data to obtain simplified data;
classifying the simplified data according to a preset format type;
if the characteristic data does not contain redundant data, directly classifying the characteristic data;
sequencing the sorted characteristic data according to data types, and matching the sequenced characteristic data with a matching segment in the data acquisition model;
and storing the characteristic data into the data acquisition model according to the matching result.
In this embodiment, the redundant data refers to the redundant data occurring in the feature data, and the redundant data is made redundant.
In this embodiment, the reduced data may be the feature data in the removed redundant data.
In this embodiment, the data classification may be performed according to the data type to which the data belongs, and for example, the data with data of int type may be classified into one class, the data with data of String type may be classified into one class, and the like.
The beneficial effects of the above technical scheme are:
the method is beneficial to improving the precision of the feature data by removing redundant data in the feature data, and can accurately realize the storage of the feature data in the data acquisition model by classifying the simplified data and performing sequencing matching.
Example 7:
on the basis of embodiment 6, the present invention provides a data acquisition method based on computer vision technology, and after storing the feature data in the data acquisition model, the method further includes:
and screening the characteristic data in the data acquisition model based on the current task of acquiring the specific position data of the target object by the computer, and acquiring final data.
In this embodiment, the collection task may be, for example: image data of a yellow portion in the image is acquired.
The beneficial effects of the above technical scheme are:
and the characteristic data is screened through a specific acquisition task, so that the final data can be effectively extracted.
Example 8:
on the basis of embodiment 1, the present invention provides a data acquisition method based on a computer vision technology, wherein before training the target image in a preset convolutional neural network, the method further includes:
based on the target image, acquiring the spatial density of the target image in the convolutional neural network, and meanwhile, constructing a training space of the target image in the convolutional neural network according to the spatial density, wherein the specific working process comprises the following steps:
obtaining a labeled sample set of the target image
Figure 601047DEST_PATH_IMAGE001
Wherein
Figure 423509DEST_PATH_IMAGE002
In order to train the sample to be trained,
Figure 64444DEST_PATH_IMAGE003
is marked corresponding to the training sample, and
Figure 263344DEST_PATH_IMAGE004
Figure 932223DEST_PATH_IMAGE005
to train the number of samples, an
Figure 925587DEST_PATH_IMAGE006
Figure 679916DEST_PATH_IMAGE007
Is as follows
Figure 292294DEST_PATH_IMAGE008
The number of class marks is set to be,
Figure 815679DEST_PATH_IMAGE008
is the number of categories;
based on the set of labeled samples
Figure 979945DEST_PATH_IMAGE001
Obtaining the set of labeled samples
Figure 221570DEST_PATH_IMAGE001
Sample distance between the i training samples
Figure 762273DEST_PATH_IMAGE028
Wherein, in the step (A),
Figure 140165DEST_PATH_IMAGE010
is shown as
Figure 383320DEST_PATH_IMAGE005
A marked sample
Figure 846663DEST_PATH_IMAGE002
To the first
Figure 191056DEST_PATH_IMAGE011
A marked sample
Figure 423455DEST_PATH_IMAGE012
The distance between them;
to pair
Figure 195102DEST_PATH_IMAGE005
Sample distance between the training samples
Figure 21106DEST_PATH_IMAGE009
Arranged in ascending order to obtain
Figure 903612DEST_PATH_IMAGE013
Wherein 1,2,. M, indicates that the sequence samples sequentially increase, and
Figure 256096DEST_PATH_IMAGE014
is the maximum sample distance;
determining a truncation distance of the training sample based on the ranking result
Figure 198644DEST_PATH_IMAGE015
Figure 636578DEST_PATH_IMAGE016
Wherein the content of the first and second substances,
Figure 431097DEST_PATH_IMAGE015
representing a truncation distance of the training sample;
Figure 638087DEST_PATH_IMAGE017
representing a number of sample points of the training sample;
Figure 751537DEST_PATH_IMAGE018
is a constant with the value range of (0, 1);
truncation distance based on the training sample
Figure 676767DEST_PATH_IMAGE019
And sample distance between the training samples
Figure 901075DEST_PATH_IMAGE009
Acquiring the spatial density of the target image in the convolutional neural network
Figure 369097DEST_PATH_IMAGE020
Figure 387869DEST_PATH_IMAGE021
Wherein the content of the first and second substances,
Figure 800395DEST_PATH_IMAGE020
representing a spatial density of the target image in the convolutional neural network;
Figure 828394DEST_PATH_IMAGE010
to represent
Figure 9977DEST_PATH_IMAGE002
To
Figure 465229DEST_PATH_IMAGE012
A distance therebetween, and
Figure 210724DEST_PATH_IMAGE022
Figure 776835DEST_PATH_IMAGE019
representing a truncation distance of the training sample;
Figure 78503DEST_PATH_IMAGE023
representing the training sample variance;
Figure 704657DEST_PATH_IMAGE024
represents a density threshold;
Figure 826196DEST_PATH_IMAGE025
is an impulse function;
spatial density of the target image in the convolutional neural network
Figure 336943DEST_PATH_IMAGE020
And the density threshold value
Figure 493118DEST_PATH_IMAGE024
Comparing;
if it is
Figure 290173DEST_PATH_IMAGE026
Then determining the training sample
Figure 899009DEST_PATH_IMAGE002
Is a core point;
if it is
Figure 806922DEST_PATH_IMAGE027
And the training sample
Figure 191505DEST_PATH_IMAGE002
Distance of truncation of
Figure 159461DEST_PATH_IMAGE019
Core points exist in the field, then the training sample
Figure 255593DEST_PATH_IMAGE002
Is a boundary point;
if the training sample
Figure 967197DEST_PATH_IMAGE002
Neither core nor boundary points, the training samples
Figure 832385DEST_PATH_IMAGE002
Is a noise point;
and constructing a training space of the target image in the convolutional neural network based on the core points, the boundary points and the noise points.
In this embodiment, acquiring a labeled sample set of a target image refers to performing a part of specific training on the target image, and the labeled sample set is used for identifying the sample.
In this embodiment, the truncated distance is obtained from the maximum sample distance in the ascending order of distances between training samples and the number of sample points, and is used to calculate the spatial density in the convolutional neural network according to the truncated distance.
In this embodiment, the core points represent the central constituent points of the training space in the convolutional neural network.
In this embodiment, the boundary points may be points used to bound the boundary of the training space in the convolutional neural network.
In this embodiment, the noise point is an interference point in a training space in the convolutional neural network, and the noise point is removed and avoided before the sample training.
The technical scheme has the beneficial effects that:
through obtaining the mark sample set to the training sample to carry out the ascending sequence according to the distance between the training sample of mark sample set and practise, can accurate acquisition training sample's truncation distance, through the truncation distance of training sample, can accurately acquire the space density in the convolutional neural network, thereby according to the comparison of space density and density threshold, can accurately constitute the training space in the convolutional neural network, not only provide the space for the sample training, but also can realize the high-efficient analysis to data.
Example 9:
the invention provides a data acquisition system based on computer vision technology, as shown in fig. 2, comprising:
a target image acquisition module: acquiring a target object identified by a computer, and photographing the target object based on a computer vision technology to acquire a target image;
a training module: training the target image in a preset convolutional neural network, and storing a training result into a data acquisition model;
a data acquisition module: and acquiring the data of the target image based on the data acquisition model.
The beneficial effects of the above technical scheme are:
by acquiring the target image and training through the convolutional neural network, accurate and efficient data analysis and acquisition can be effectively realized through a computer vision technology and a data acquisition model based on a training result.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A data acquisition method based on computer vision technology is characterized by comprising the following steps:
acquiring a target object identified by a computer, and photographing the target object to acquire a target image;
training the target image in a preset convolutional neural network, and storing a training result into a data acquisition model;
based on a computer vision technology and the data acquisition model, carrying out recognition analysis and acquisition on the data of the target image;
before training the target image in a preset convolutional neural network, the method further comprises:
based on the target image, acquiring the spatial density of the target image in the convolutional neural network, and meanwhile, constructing a training space of the target image in the convolutional neural network according to the spatial density, wherein the specific working process comprises the following steps:
obtaining a labeled sample set of the target image
Figure 884120DEST_PATH_IMAGE001
Wherein
Figure 320918DEST_PATH_IMAGE002
In order to train the sample to be trained,
Figure 885891DEST_PATH_IMAGE003
is marked corresponding to the training sample, and
Figure 66337DEST_PATH_IMAGE004
Figure 400366DEST_PATH_IMAGE005
to train the number of samples, an
Figure 8065DEST_PATH_IMAGE006
Figure 60335DEST_PATH_IMAGE007
Is as follows
Figure 793540DEST_PATH_IMAGE008
The number of class marks is set to be,
Figure 247656DEST_PATH_IMAGE008
is the number of categories;
based on the set of labeled samples
Figure 26256DEST_PATH_IMAGE001
Obtaining the set of labeled samples
Figure 565821DEST_PATH_IMAGE001
Sample distance between the i training samples
Figure 88070DEST_PATH_IMAGE009
Wherein, in the step (A),
Figure 396691DEST_PATH_IMAGE010
is shown as
Figure 346193DEST_PATH_IMAGE005
A marked sample
Figure 107475DEST_PATH_IMAGE012
To the first
Figure 433414DEST_PATH_IMAGE013
A marked sample
Figure 596543DEST_PATH_IMAGE014
The distance between them;
to pair
Figure 716945DEST_PATH_IMAGE005
Sample distance between the training samples
Figure 231103DEST_PATH_IMAGE009
Arranged in ascending order to obtain
Figure 95154DEST_PATH_IMAGE015
Wherein 1,2,. M, indicates that the sequence samples sequentially increase, and
Figure 112789DEST_PATH_IMAGE016
is the maximum sample distance;
determining a truncation distance of the training sample based on the ranking result
Figure 669672DEST_PATH_IMAGE017
Figure 405547DEST_PATH_IMAGE018
Wherein the content of the first and second substances,
Figure 273621DEST_PATH_IMAGE017
representing a truncation distance of the training sample;
Figure 145762DEST_PATH_IMAGE019
representing a number of sample points of the training sample;
Figure 873547DEST_PATH_IMAGE020
is a constant with the value range of (0, 1);
truncation distance based on the training sample
Figure 96718DEST_PATH_IMAGE021
And sample distance between the training samples
Figure 302571DEST_PATH_IMAGE009
Acquiring the spatial density of the target image in the convolutional neural network
Figure 294798DEST_PATH_IMAGE022
Figure 193484DEST_PATH_IMAGE023
Wherein the content of the first and second substances,
Figure 435109DEST_PATH_IMAGE022
representing spatial density of the target image in the convolutional neural networkDegree;
Figure 444654DEST_PATH_IMAGE010
to represent
Figure 556966DEST_PATH_IMAGE002
To
Figure 360974DEST_PATH_IMAGE014
A distance therebetween, and
Figure 558737DEST_PATH_IMAGE024
Figure 106393DEST_PATH_IMAGE021
representing a truncation distance of the training sample;
Figure 73212DEST_PATH_IMAGE025
representing the training sample variance;
Figure 48121DEST_PATH_IMAGE026
represents a density threshold;
Figure 733181DEST_PATH_IMAGE027
is an impulse function;
spatial density of the target image in the convolutional neural network
Figure 87457DEST_PATH_IMAGE022
And the density threshold value
Figure 908783DEST_PATH_IMAGE026
Comparing;
if it is
Figure 320172DEST_PATH_IMAGE028
Then determining the training sample
Figure 226949DEST_PATH_IMAGE002
Is a core point;
if it is
Figure 116407DEST_PATH_IMAGE029
And the training sample
Figure 57818DEST_PATH_IMAGE002
Distance of truncation of
Figure 374530DEST_PATH_IMAGE021
Core points exist in the field, then the training sample
Figure 768602DEST_PATH_IMAGE002
Is a boundary point;
if the training sample
Figure 461752DEST_PATH_IMAGE002
Neither core nor boundary points, the training samples
Figure 257670DEST_PATH_IMAGE002
Is a noise point;
and constructing a training space of the target image in the convolutional neural network based on the core points, the boundary points and the noise points.
2. The data acquisition method based on computer vision technology as claimed in claim 1, wherein after the target object identified by the computer is obtained and before the photographing and sampling of the target object, the method further comprises:
determining effective information of the target object based on the gray matrix texture, and determining the position characteristic of the target object based on an Euclidean distance mapping method;
preprocessing the position characteristics of the target object and the effective information to acquire processing information;
establishing an analysis file, and analyzing and processing the processing information by using the analysis file so as to mark each element point in the target object;
marking each element point in the target object to obtain a marking result of the element point;
evaluating the marking result of the element points based on a preset evaluation index, and acquiring an evaluation result;
meanwhile, based on the evaluation result, the target object is subjected to area delineation, and the delineated target object is photographed through the computer to obtain the target image.
3. A method for data acquisition based on computer vision technology as claimed in claim 2,
the valid information includes: the color of the target object, the texture window of the target object, the target angle, the target gray texture and the color texture feature.
4. The data acquisition method based on computer vision technology as claimed in claim 1, wherein after the target object is photographed, the method further comprises:
acquiring an initial image of the target object, acquiring a gray value of each pixel in the initial image, and acquiring a gray matrix based on the gray value;
extracting the gray distribution trend of the row/column of the gray matrix, and acquiring a balance weight array of the initial image according to the gray distribution trend;
correcting the gray matrix based on the balance weight number to obtain an initial gray image;
acquiring M classification sets and a filtering parameter corresponding to each classification set;
the classification set is obtained by classifying the gray pixels of the current initial gray image according to a preset classification mode;
filtering each gray pixel of the initial gray image according to the filtering parameters corresponding to the classification set to obtain an initial gray filtering image;
partitioning the initial gray level filtering image to obtain sub image blocks of N initial gray level filtering images;
acquiring the main direction of the texture of the sub image block based on a preset image texture analysis file;
meanwhile, according to a preset algorithm, obtaining gradient values of pixel gray values corresponding to the sub-image blocks in the x direction or the y direction, and calculating an average value of the gradient values in the x direction or the y direction;
meanwhile, a gradient threshold value of the gradient value is obtained, and binarization processing is carried out on the main direction of the texture of the sub-image block based on the gradient threshold value;
taking the average value of the gradient values as a clustering center, and combining the sub-image blocks into a complete binary image according to the clustering center;
removing impurities in the area of the binary image according to a preset area threshold value, and setting the length-width ratio of the binary image;
removing non-strip-shaped impurities in the binary image according to the length-width ratio to obtain a final processed image;
and the final processed image is the target image.
5. The data acquisition method based on computer vision technology as claimed in claim 1, wherein the process of training the target image in a preset convolutional neural network comprises:
acquiring a feature map area in a preset convolutional neural network, extracting a preset size in the feature map area,
dividing the complete region of the target image according to the preset size, and acquiring a plurality of divided independent sub-image regions;
generating the coordinates of each pixel point of the sub-graph area into the relative coordinates of the pixel points at the corresponding position of the feature graph, and acquiring a coordinate channel corresponding to the feature graph;
and carrying out deep learning on the target image with the coordinate channel according to the parameters of the convolutional neural network, and generating a training result containing the characteristic diagram.
6. A data collection method based on computer vision technology as claimed in claim 1, wherein the working process of storing the training result to the data collection model comprises:
extracting feature data of the target image based on the training result;
analyzing and judging whether redundant data exist in the characteristic data according to a preset algorithm;
if the characteristic data contains redundant data, removing the redundant data in the characteristic data to obtain simplified data;
classifying the simplified data according to a preset format type;
if the characteristic data does not contain redundant data, directly classifying the characteristic data;
sequencing the sorted characteristic data according to data types, and matching the sequenced characteristic data with a matching segment in the data acquisition model;
and storing the characteristic data into the data acquisition model according to the matching result.
7. The data acquisition method based on computer vision technology as claimed in claim 6, wherein after storing the feature data in the data acquisition model, further comprising:
and screening the characteristic data in the data acquisition model based on the current task of acquiring the specific position data of the target object by the computer, and acquiring final data.
8. A data acquisition system based on computer vision technology, comprising:
a target image acquisition module: acquiring a target object identified by a computer, and photographing the target object based on a computer vision technology to acquire a target image;
a training module: training the target image in a preset convolutional neural network, and storing a training result into a data acquisition model;
a data acquisition module: and acquiring the data of the target image based on the data acquisition model.
CN202110032387.9A 2021-01-12 2021-01-12 Data acquisition method and system based on computer vision technology Active CN112364844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110032387.9A CN112364844B (en) 2021-01-12 2021-01-12 Data acquisition method and system based on computer vision technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110032387.9A CN112364844B (en) 2021-01-12 2021-01-12 Data acquisition method and system based on computer vision technology

Publications (2)

Publication Number Publication Date
CN112364844A CN112364844A (en) 2021-02-12
CN112364844B true CN112364844B (en) 2021-05-18

Family

ID=74534722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110032387.9A Active CN112364844B (en) 2021-01-12 2021-01-12 Data acquisition method and system based on computer vision technology

Country Status (1)

Country Link
CN (1) CN112364844B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117607642B (en) * 2024-01-23 2024-03-26 中铁电气化铁路运营管理有限公司 Rail transit data analysis method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016115778A1 (en) * 2015-01-20 2016-07-28 中兴通讯股份有限公司 Method and apparatus for adjusting projection area
CN109977891A (en) * 2019-03-30 2019-07-05 哈尔滨理工大学 A kind of object detection and recognition method neural network based
CN110838173A (en) * 2019-11-15 2020-02-25 天津医科大学 Three-dimensional texture feature-based individual brain covariant network construction method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016115778A1 (en) * 2015-01-20 2016-07-28 中兴通讯股份有限公司 Method and apparatus for adjusting projection area
CN109977891A (en) * 2019-03-30 2019-07-05 哈尔滨理工大学 A kind of object detection and recognition method neural network based
CN110838173A (en) * 2019-11-15 2020-02-25 天津医科大学 Three-dimensional texture feature-based individual brain covariant network construction method

Also Published As

Publication number Publication date
CN112364844A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN108830188B (en) Vehicle detection method based on deep learning
CN111325203B (en) American license plate recognition method and system based on image correction
CN107665492B (en) Colorectal panoramic digital pathological image tissue segmentation method based on depth network
CN111738064B (en) Haze concentration identification method for haze image
CN108564085B (en) Method for automatically reading of pointer type instrument
CN110032932B (en) Human body posture identification method based on video processing and decision tree set threshold
CN109948566A (en) A kind of anti-fraud detection method of double-current face based on weight fusion and feature selecting
CN108509950B (en) Railway contact net support number plate detection and identification method based on probability feature weighted fusion
CN114067444A (en) Face spoofing detection method and system based on meta-pseudo label and illumination invariant feature
CN112307919B (en) Improved YOLOv 3-based digital information area identification method in document image
CN111260645A (en) Method and system for detecting tampered image based on block classification deep learning
CN114445879A (en) High-precision face recognition method and face recognition equipment
CN111291818B (en) Non-uniform class sample equalization method for cloud mask
CN111046838A (en) Method and device for identifying wetland remote sensing information
CN115294377A (en) System and method for identifying road cracks
CN112364844B (en) Data acquisition method and system based on computer vision technology
CN115019294A (en) Pointer instrument reading identification method and system
CN114092456A (en) Cell fluorescence image distinguishing method and system
CN106548195A (en) A kind of object detection method based on modified model HOG ULBP feature operators
CN115830514B (en) Whole river reach surface flow velocity calculation method and system suitable for curved river channel
CN109741351A (en) A kind of classification responsive type edge detection method based on deep learning
CN110910497B (en) Method and system for realizing augmented reality map
CN113269136B (en) Off-line signature verification method based on triplet loss
CN108734158B (en) Real-time train number identification method and device
CN111612045B (en) Universal method for acquiring target detection data set

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
GR01 Patent grant
GR01 Patent grant