CN115439675A - Complex feature target identification and classification method based on machine vision - Google Patents

Complex feature target identification and classification method based on machine vision Download PDF

Info

Publication number
CN115439675A
CN115439675A CN202210935073.4A CN202210935073A CN115439675A CN 115439675 A CN115439675 A CN 115439675A CN 202210935073 A CN202210935073 A CN 202210935073A CN 115439675 A CN115439675 A CN 115439675A
Authority
CN
China
Prior art keywords
image
pixel
identifying
loss
machine vision
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
CN202210935073.4A
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.)
Zhuhai Technology Suzhou Co ltd
Original Assignee
Zhuhai Technology Suzhou 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 Zhuhai Technology Suzhou Co ltd filed Critical Zhuhai Technology Suzhou Co ltd
Priority to CN202210935073.4A priority Critical patent/CN115439675A/en
Publication of CN115439675A publication Critical patent/CN115439675A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/34Smoothing or thinning of the pattern; Morphological operations; Skeletonisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/36Applying a local operator, i.e. means to operate on image points situated in the vicinity of a given point; Non-linear local filtering operations, e.g. median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Nonlinear Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a method for identifying and classifying complex characteristic targets based on machine vision, which adopts a method of combining a target identification algorithm based on composite characteristics with a convolutional neural network to realize rapid identification and classification of the complex characteristic targets in a complex background, has good universality, introduces a machine learning and deep learning algorithm in the process of target detection and classification, improves the accuracy rate of target identification as much as possible, and greatly improves the efficiency of the algorithm.

Description

Complex feature target identification and classification method based on machine vision
Technical Field
The invention relates to the technical field of industrial intelligent detection, in particular to a complex characteristic target identification and classification method based on machine vision.
Background
With the progress of related technologies such as computer science and image processing, image detection methods based on machine vision are increasingly used in the field of industrial surface detection applications. However, in complex image information, especially in detection targets with complex feature information, the accuracy and efficiency of the current algorithm for identifying and classifying such image targets are not ideal, and the application of artificial intelligence technology in related fields is greatly restricted.
Aiming at the problems, the invention provides a method for identifying and classifying complex characteristic targets based on machine vision, which realizes the rapid identification and classification of the complex characteristic targets in a complex background, has good universality, improves the target identification accuracy as much as possible, and greatly improves the efficiency of an algorithm.
Disclosure of Invention
The invention aims to overcome the problems in the prior art and provides a method for identifying and classifying complex characteristic targets based on machine vision.
In order to achieve the technical purpose and achieve the technical effect, the invention is realized by the following technical scheme:
a method for identifying and classifying complex feature targets based on machine vision comprises the following steps:
step S1: preprocessing an image, denoising and performing brightness compensation on the image with uneven illumination;
step S2: performing image threshold segmentation by adopting a target identification algorithm based on composite characteristics, forming a region corresponding to a live-action target by using the obtained subsets through division, reducing or eliminating image noise pollution, removing a non-edge pixel point set, only reserving part of candidate edges, and performing threshold lag by adopting high and low thresholds;
and step S3: carrying out image clustering to realize efficient marking on the characteristics;
and step S4: and identifying and classifying the features to achieve the aim of target detection.
Further, in step S1, the image preprocessing method includes: firstly, carrying out Gaussian filtering denoising on an image, and carrying out local processing on the processed image to carry out uneven illumination compensation; wherein,
the Gaussian filtering denoising adopts a two-dimensional zero-mean discrete Gaussian function as a smoothing filter, and sets cubic Gaussian filtering, wherein the two-dimensional Gaussian function is as follows:
Figure BDA0003783861500000021
wherein σ is a numerical variance;
after the image is denoised by Gaussian filtering for three times, locally processing the processed image to perform uneven illumination compensation, dividing the source image into NxM subblock regions, calculating the average gray value of each subblock to obtain a subblock brightness matrix of the source image, amplifying the subblock brightness difference matrix to the size of the source image by adopting a cubic interpolation method to obtain a brightness distribution matrix of the original image, and finally subtracting the original image from the brightness distribution matrix to obtain the image without uneven illumination.
Further, in step S2, the target identification algorithm based on the composite feature includes the following steps:
step S201: and (2) performing threshold segmentation on the image, namely dividing a pixel set in the image according to the gray level, wherein the divided subsets form areas corresponding to the real scene target:
Figure BDA0003783861500000031
in the formula, T is a set gray value threshold value;
step S202: adopting a Gaussian smoothing filter to reduce or eliminate image noise pollution, wherein f (x, y) is an input image, and a Gaussian function is defined as:
Figure BDA0003783861500000032
in formula, σ is a numerical variance, and a gaussian smooth output image is: f. of s (x,y)=G(x,y)*f(x,y);
Step S203: calculating gradient amplitude and direction, inhibiting non-maximum values, removing non-edge pixel point sets and only reserving partial candidate edges;
step S204: threshold hysteresis is carried out by adopting high and low thresholds, and the specific method comprises the following steps: if the amplitude of a certain pixel position in the image is larger than a set high threshold value, the pixel is reserved as an edge pixel; if the magnitude of the pixel location is less than the set low threshold, then the pixel is not identified as an edge pixel; if the magnitude of a pixel location is between the high and low thresholds, the pixel can only be retained as an edge pixel if it has connections to a pixel that is greater than the high threshold.
Further, in step S3, the method for clustering images includes the following steps:
step S301: randomly selecting K central points;
step S302: assigning each data point to its nearest center point;
step S303: recalculating the average value of the distances from the points in each class to the central point of the class;
step S304: assigning each data to its nearest center point;
step S305: step S303 and step S304 are repeated until all observations are no longer assigned or a maximum number of iterations is reached.
Further, in step S3, the method for clustering images includes the following steps:
step S301: randomly selecting K central points;
step S302: assigning each data point to its nearest center point;
step S303: recalculating the average value of the distances from the points in each class to the center point of the class;
step S304: assigning each data to its nearest central point;
step S305: step S303 and step S304 are repeated until all observations are no longer assigned or a maximum number of iterations is reached.
5. The method for identifying and classifying complex-feature targets based on machine vision according to claim 4, wherein in the step S3, the algorithm for identifying the targets comprises the following steps:
step S401: presetting anchor frames with different lengths and widths, and simultaneously using t x ,t y To represent the predicted object position, using t w ,t h To represent the predicted object dimensions;
step S402: finding the transformation of the anchor frame which is closest to the detected object shape and the object surrounding rectangle;
step S403: calculating loss by adopting a cross entropy function, and assuming that the object class label is y and the neural network output value is
Figure BDA0003783861500000056
Then there are:
Figure BDA0003783861500000051
Figure BDA0003783861500000052
in the formula, L obj Is a loss value;
step S404: calculating the loss by using a mean square error function, assuming the marked position as t * The output of the neural network is
Figure BDA0003783861500000057
Then there are:
Figure BDA0003783861500000053
Figure BDA0003783861500000054
in the formula, t *x 、t *y As a position parameter, t *w 、t *h As a dimensional parameter, L xy For loss of position parameter, L wh Loss of dimensional parameters;
step S405: and multiplying each loss function by corresponding weight respectively and adding the loss functions to obtain a cost function of the network:
Figure BDA0003783861500000055
in the formula, λ is a weight parameter.
The beneficial effects of the invention are:
the method combines the target recognition algorithm based on the composite features with the convolutional neural network, realizes the rapid recognition and classification of the complex feature targets in the complex background, has good universality, introduces the machine learning and deep learning algorithm in the target detection and classification process, improves the target recognition accuracy as much as possible, and greatly improves the efficiency of the algorithm.
Drawings
FIG. 1 is a block flow diagram of the present invention;
FIG. 2 is a block flow diagram of image pre-processing in an embodiment of the invention;
FIG. 3 is a block diagram of a target recognition algorithm based on composite features according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As shown in fig. 1, a method for identifying and classifying complex feature targets based on machine vision includes the following steps:
step S1: preprocessing an image, denoising and performing brightness compensation on the image with uneven illumination;
step S2: performing image threshold segmentation by adopting a target identification algorithm based on composite characteristics, forming a region corresponding to a live-action target by using the obtained subsets through division, reducing or eliminating image noise pollution, removing a non-edge pixel point set, only reserving part of candidate edges, and performing threshold lag by adopting high and low thresholds;
and step S3: carrying out image clustering to realize efficient marking on the characteristics;
and step S4: and identifying and classifying the features to achieve the aim of target detection.
As shown in fig. 2, in step S1, the image preprocessing method includes: firstly, carrying out Gaussian filtering denoising on an image, and carrying out local processing on the processed image to carry out uneven illumination compensation; wherein,
the Gaussian filtering denoising adopts a two-dimensional zero-mean discrete Gaussian function as a smoothing filter, and sets cubic Gaussian filtering, wherein the two-dimensional Gaussian function is as follows:
Figure BDA0003783861500000071
wherein σ is a numerical variance;
after the image is denoised by Gaussian filtering for three times, locally processing the processed image to perform uneven illumination compensation, dividing the source image into NxM subblock regions, calculating the average gray value of each subblock to obtain a subblock brightness matrix of the source image, amplifying the subblock brightness difference matrix to the size of the source image by adopting a cubic interpolation method to obtain a brightness distribution matrix of the original image, and finally subtracting the original image from the brightness distribution matrix to obtain the image without uneven illumination.
As shown in fig. 3, in step S2, the target identification algorithm based on the composite feature includes the following steps:
step S201: and (2) image threshold segmentation, namely dividing a pixel set in an image according to gray levels, wherein the divided subsets form areas corresponding to the real scene target:
Figure BDA0003783861500000072
in the formula, T is a set gray value threshold;
step S202: adopting a Gaussian smoothing filter to reduce or eliminate image noise pollution, wherein f (x, y) is an input image, and a Gaussian function is defined as:
Figure BDA0003783861500000073
in the formula, sigma is a numerical formulaPoor, gaussian smoothed output image is: f. of s (x,y)=G(x,y)*f(x,y);
Step S203: calculating gradient amplitude and direction, inhibiting non-maximum values, removing non-edge pixel point sets and only reserving partial candidate edges;
step S204: threshold hysteresis is carried out by adopting high and low thresholds, and the specific method comprises the following steps: if the amplitude of a certain pixel position in the image is larger than a set high threshold value, the pixel is reserved as an edge pixel; if the magnitude of the pixel location is less than the set low threshold, then the pixel is not identified as an edge pixel; if the magnitude of a pixel location is between the high and low thresholds, the pixel can only be retained as an edge pixel if it has connections to a pixel that is greater than the high threshold.
In step S3, the image clustering method includes the following steps:
step S301: randomly selecting K central points;
step S302: assigning each data point to its nearest center point;
step S303: recalculating the average value of the distances from the points in each class to the center point of the class;
step S304: assigning each data to its nearest central point;
step S305: step S303 and step S304 are repeated until all observations are no longer assigned or the maximum number of iterations is reached.
5. The method for identifying and classifying complex-feature targets based on machine vision according to claim 4, wherein in the step S3, the algorithm for identifying the targets comprises the following steps:
step S401: presetting anchor frames with different lengths and widths, and using t x ,t y To represent the predicted object position, using t w ,t h To represent the predicted object dimensions;
step S402: finding the transformation of the anchor frame which is closest to the detected object shape and the object surrounding rectangle;
step S403: calculating loss by adopting a cross entropy function, and assuming that the object class label is y, outputting a value by a neural networkIs composed of
Figure BDA0003783861500000097
Then there are:
Figure BDA0003783861500000091
Figure BDA0003783861500000092
in the formula, L obj Is a loss value;
step S404: calculating the loss by using a mean square error function, assuming the marked position as t * The output of the neural network is
Figure BDA0003783861500000093
Then there are:
Figure BDA0003783861500000094
Figure BDA0003783861500000095
in the formula, t *x 、t *y As a position parameter, t *w 、t *h As a dimensional parameter, L xy For loss of position parameter, L wh Loss of dimensional parameters;
step S405: and multiplying each loss function by corresponding weight respectively and adding the loss functions to obtain a cost function of the network:
Figure BDA0003783861500000096
in the formula, λ is a weight parameter.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (5)

1. A method for identifying and classifying complex feature targets based on machine vision is characterized by comprising the following steps:
step S1: preprocessing an image, denoising and performing brightness compensation on the image with uneven illumination;
step S2: performing image threshold segmentation by adopting a target identification algorithm based on composite characteristics, forming a region corresponding to a live-action target by using the obtained subsets through division, reducing or eliminating image noise pollution, removing a non-edge pixel point set, only reserving part of candidate edges, and performing threshold lag by adopting high and low thresholds;
and step S3: carrying out image clustering to realize efficient marking on the characteristics;
and step S4: and identifying and classifying the features to achieve the aim of target detection.
2. The method for identifying and classifying a complex-feature target based on machine vision according to claim 1, wherein in step S1, the image preprocessing method is: firstly, carrying out Gaussian filtering denoising on an image, and carrying out local processing on the processed image to carry out uneven illumination compensation; wherein,
the Gaussian filtering denoising adopts a two-dimensional zero-mean discrete Gaussian function as a smoothing filter, and sets cubic Gaussian filtering, wherein the two-dimensional Gaussian function is as follows:
Figure 520107DEST_PATH_IMAGE001
in the formula (I), wherein,
Figure 906089DEST_PATH_IMAGE002
is a numerical variance;
after the image is denoised by Gaussian filtering for three times, locally processing the processed image to perform uneven illumination compensation, dividing the source image into N x M subblock areas, calculating the average gray value of each subblock to obtain a subblock brightness matrix of the source image, amplifying the subblock brightness difference matrix to the size of the source image by adopting a cubic interpolation method to obtain a brightness distribution matrix of the source image, and finally subtracting the source image from the brightness distribution matrix to obtain the image without uneven illumination.
3. The method for identifying and classifying complex-feature objects based on machine vision according to claim 2, wherein in the step S2, the object identification algorithm based on composite features comprises the following steps:
step S201: and (2) performing threshold segmentation on the image, namely dividing a pixel set in the image according to the gray level, wherein the divided subsets form areas corresponding to the real scene target:
Figure 482564DEST_PATH_IMAGE003
wherein T is a set gray value threshold;
step S202: reducing or eliminating image noise pollution by using Gaussian smoothing filter
Figure 221981DEST_PATH_IMAGE004
For an input image, the gaussian function is defined as:
Figure 505195DEST_PATH_IMAGE005
in the formula of Chinese
Figure 921133DEST_PATH_IMAGE002
For the numerical variance, the gaussian smoothed output image is:
Figure 922587DEST_PATH_IMAGE006
step S203: calculating gradient amplitude and direction, inhibiting non-maximum values, removing non-edge pixel point sets, and only reserving partial candidate edges;
step S204: threshold hysteresis is carried out by adopting high and low thresholds, and the specific method comprises the following steps: if the amplitude of a certain pixel position in the image is larger than a set high threshold value, the pixel is reserved as an edge pixel; if the magnitude of the pixel location is less than the set low threshold, then the pixel is not identified as an edge pixel; if the magnitude of a pixel location is between the high and low thresholds, the pixel can only be retained as an edge pixel if it has connections to a pixel that is greater than the high threshold.
4. The method for identifying and classifying complex-feature targets based on machine vision according to claim 3, wherein in the step S3, the method for clustering images comprises the following steps:
step S301: randomly selecting K central points;
step S302: assigning each data point to its nearest center point;
step S303: recalculating the average value of the distances from the points in each class to the central point of the class;
step S304: assigning each data to its nearest central point;
step S305: step S303 and step S304 are repeated until all observations are no longer assigned or the maximum number of iterations is reached.
5. The method for identifying and classifying complex-feature targets based on machine vision according to claim 4, wherein in the step S3, the algorithm for identifying the targets comprises the following steps:
step S401: presetting anchor frames with different lengths and widths, and simultaneously using t x ,t y To represent the predicted object position, using t w ,t h To represent the predicted object size;
step S402: finding the transformation of the anchor frame closest to the shape of the detected object and the object enclosing rectangle;
step S403: calculating loss by adopting a cross entropy function, and assuming that the object class label is y and the neural network output value is
Figure 668957DEST_PATH_IMAGE007
Then, there are:
Figure 196891DEST_PATH_IMAGE008
in the formula (I), wherein,
Figure 659096DEST_PATH_IMAGE009
is a loss value;
step S404: the loss is calculated using the mean square error function, assuming the annotated position is
Figure 957966DEST_PATH_IMAGE010
The output of the neural network is
Figure 288453DEST_PATH_IMAGE011
Then, there are:
Figure 280680DEST_PATH_IMAGE012
in the formula, t *x 、t *y As a position parameter, t *w 、t *h As a dimensional parameter, L xy For loss of position parameter, L wh Loss of dimensional parameters;
step S405: and multiplying each loss function by corresponding weight respectively and adding the loss functions to obtain a cost function of the network:
Figure 54732DEST_PATH_IMAGE013
in the formula, λ is a weight parameter.
CN202210935073.4A 2022-08-05 2022-08-05 Complex feature target identification and classification method based on machine vision Pending CN115439675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210935073.4A CN115439675A (en) 2022-08-05 2022-08-05 Complex feature target identification and classification method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210935073.4A CN115439675A (en) 2022-08-05 2022-08-05 Complex feature target identification and classification method based on machine vision

Publications (1)

Publication Number Publication Date
CN115439675A true CN115439675A (en) 2022-12-06

Family

ID=84242679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210935073.4A Pending CN115439675A (en) 2022-08-05 2022-08-05 Complex feature target identification and classification method based on machine vision

Country Status (1)

Country Link
CN (1) CN115439675A (en)

Similar Documents

Publication Publication Date Title
CN112819772B (en) High-precision rapid pattern detection and recognition method
CN109035274B (en) Document image binarization method based on background estimation and U-shaped convolution neural network
CN1885317A (en) Adaptive edge detection method based on morphology and information entropy
CN103996209A (en) Infrared vessel object segmentation method based on salient region detection
CN108537816B (en) Salient object segmentation method based on superpixel and background connection prior
CN111583279A (en) Super-pixel image segmentation method based on PCBA
CN116071374B (en) Lane line instance segmentation method and system
CN112686248A (en) Certificate increase and decrease type detection method and device, readable storage medium and terminal
CN110634142B (en) Complex vehicle road image boundary optimization method
CN109308709B (en) Vibe moving target detection algorithm based on image segmentation
CN111027564A (en) Low-illumination imaging license plate recognition method and device based on deep learning integration
CN113205494B (en) Infrared small target detection method and system based on adaptive scale image block weighting difference measurement
CN109636822A (en) A kind of improvement Canny adaptive edge extracting method based on new building subordinating degree function
CN111914749A (en) Lane line recognition method and system based on neural network
CN115439675A (en) Complex feature target identification and classification method based on machine vision
CN113284232B (en) Optical flow tracking method based on quadtree
Aung et al. Study for license plate detection
CN114549649A (en) Feature matching-based rapid identification method for scanned map point symbols
Kumar et al. Pixel-based skin color classifier: A review
CN112419337A (en) Detection method for robot grabbing position under complex background
CN113378876B (en) Method for self-adaptively determining size of target and size of receptive field
Nair et al. A survey of techniques for license plate detection and recognition
Yuan et al. Single Image Defogging Method based on Deep Learning
Kumar et al. Computationally Efficient Scaled Clustering for Perceptually Invisible Image Intensity Tuning
Xiao et al. Road detection based on superpixels and anisotropic heat diffusion

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