WO2020173177A1 - 物体色差缺陷检测方法、装置、计算机设备及存储介质 - Google Patents

物体色差缺陷检测方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020173177A1
WO2020173177A1 PCT/CN2019/125095 CN2019125095W WO2020173177A1 WO 2020173177 A1 WO2020173177 A1 WO 2020173177A1 CN 2019125095 W CN2019125095 W CN 2019125095W WO 2020173177 A1 WO2020173177 A1 WO 2020173177A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
measured
neural network
defect detection
pixel
Prior art date
Application number
PCT/CN2019/125095
Other languages
English (en)
French (fr)
Inventor
戴志威
林淼
刘志永
陈志列
Original Assignee
研祥智能科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 研祥智能科技股份有限公司 filed Critical 研祥智能科技股份有限公司
Publication of WO2020173177A1 publication Critical patent/WO2020173177A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • 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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Definitions

  • This application relates to an object color difference defect detection method, device, computer equipment and storage medium.
  • the traditional surface chromatic aberration detection method is to arrange professional quality inspectors to use manual visual inspection to detect the surface chromatic aberration defects of the object to be tested.
  • a method, device, computer equipment, and storage medium for detecting object color difference defects are provided.
  • An object color difference defect detection method including:
  • the object color defect detection result of the object to be tested is obtained.
  • An object color difference defect detection device including:
  • Multiple image acquisition module for acquiring multiple color images of the object to be measured
  • Single-channel image acquisition module used to perform principal component analysis on multiple color images to acquire single-channel images of the object to be measured
  • the gray value extraction module is used to extract the gray value of pixels in a single-channel image
  • the pixel defect result acquisition module is used to input the pixel gray value of the single-channel image into the BP neural network model based on the gradient descent algorithm to obtain the pixel defect detection result;
  • the color difference defect result acquisition module is used to obtain the object color difference defect detection result of the object to be tested according to the pixel defect detection result.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • the object color defect detection result of the object to be tested is obtained.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the following steps:
  • the object color defect detection result of the object to be tested is obtained.
  • FIG. 1 is a schematic flowchart of a method for detecting color difference defects of an object according to one or more embodiments.
  • Fig. 2 is a schematic flowchart of a method for detecting color difference defects of an object in another embodiment.
  • Fig. 3 is a block diagram of an object color difference defect detection device according to one or more embodiments.
  • Figure 4 is a block diagram of a computer device according to one or more embodiments.
  • a method for detecting object color difference defects which includes the following steps:
  • S110 Acquire multiple color images of the object to be measured.
  • Multivariate color image is a measurement that represents multiple different properties of the same object, and corresponds to the image data of multiple channels in space, that is, the image of multiple channels is superimposed on the gray value, and the pixel coordinates of the single-channel image are compared with the two-dimensional
  • the multi-element image adds one-dimensional scale information to the two-dimensional basis, making it a three-dimensional color image.
  • the scale variable can be represented by any parameter. Taking the stainless steel steel plate as an example, the multi-color image of the stainless steel plate is acquired.
  • S120 Perform principal component analysis on the multivariate color image to obtain a single-channel image of the object to be measured.
  • an image includes a pixel map composed of pixels, which is an image formed by a regular and clever combination and arrangement of a single pixel as a unit.
  • the image channel refers to the separate red R, green G, and blue B parts.
  • the image is generally composed of three channels of red, green and blue.
  • the pixels of the image are all There are three values; but the image is not limited to three-channel images, it can be three-channel images or four-channel images and other multi-channel images.
  • CMYK mode has 4 channels, and the pixels of a 4-channel image have 4 values.
  • the single-channel image means that each pixel has only one value to represent the color, which can be understood as a grayscale image.
  • the multi-color image is a multi-channel three-dimensional color image, and the principal component analysis is performed on the multi-color image to obtain a single-channel image that meets the requirements.
  • the number of single-channel images obtained can be multiple, which is understandable Yes, this embodiment does not require the number of single-channel images.
  • Gray value refers to the fact that because the color and brightness of each point in the scene are different, each point on the black-and-white photo or the black-and-white image reproduced by the TV shows different degrees of gray.
  • the logarithmic relationship between white and black is divided into several Level, called gray level. The range is generally from 0 to 225.
  • the gray value in the single-channel image can be extracted by any of the floating-point algorithm, integer method, shift method, or averaging method.
  • S140 Input the pixel gray value of the single-channel image into the BP neural network model constructed based on the gradient descent algorithm to obtain the pixel defect detection result.
  • the BP neural network model is a multilayer feedforward neural network trained according to the error back propagation algorithm.
  • the main idea is to propagate the error of the output layer layer by layer from back to front to indirectly calculate the hidden layer error.
  • the input information is calculated from the input layer through the hidden layer layer by layer to calculate the output value of each unit.
  • the output error is calculated layer by layer forward to calculate the error between each unit of the hidden layer, and the error is used to correct the weight of the previous layer.
  • the gradient descent algorithm is a kind of iterative method, which can solve the least squares problem. Through the step by step iterative solution of the gradient descent algorithm, the minimized loss function and model parameters are obtained.
  • the BP neural network model is constructed based on the gradient descent algorithm. After inputting the gray values of the pixels of the single-channel image into the model, the constructed BP neural network model is used to identify whether the pixels are qualified. When the defect is unqualified, the model outputs a failure message. When the pixel has no defect and is qualified, it outputs a pixel qualified message. Specifically, when the pixel is identified as defective and unqualified, it outputs 0, indicating that the pixel is abnormal. When the defect is qualified, 1 is output, indicating that the pixel is normal.
  • Pixels are a form of image color.
  • the pixels of the image are input to the BP neural network model one by one, the output results of the BP network model are recognized, and the defect recognition results of the pixels in the entire image are obtained.
  • the pixels have defects
  • the color of the image of the object to be measured composed of pixels is an image with chromatic aberration defects, so there are chromatic aberration defects on the surface of the stainless steel plate.
  • the defective pixels are marked as 0, the non-defective pixels are marked as 1, and the mark of the pixel is identified, and the position of the defective pixel is tracked.
  • the surface of the stainless steel steel plate has chromatic aberration defects.
  • the preset threshold may not be limited in this embodiment, and may be set according to the actual situation of production requirements. If not necessary, when the color difference test result of the stainless steel plate is obtained, record the model of the stainless steel plate and the corresponding color difference defect, calculate the pass rate of the stainless steel plate, and send the test result, record result, pass rate and other information To the management terminal.
  • the above-mentioned object chromatic aberration defect detection method Through the principal component analysis of the multivariate color image, the multivariate analysis of the image of the object to be measured can be performed to obtain the single-channel image of the object to be measured, and the pixel gray value of the extracted single-channel image is input into the BP nerve constructed based on the gradient descent algorithm
  • the network model automatically compares and detects the pixel chromatic aberration defects of the image of the object to be tested. According to the pixel defect detection result of the image of the object to be tested, the chromatic defect detection result of the object to be tested is obtained. Manual operation is not required, and automatic learning and detection are performed, and the result is accurate.
  • the pixel gray value of the single-channel image is input into the BP neural network model constructed based on the gradient descent algorithm, and before the pixel defect detection result is obtained, it also includes: constructing the BP neural network initial model, the BP neural network initial
  • the input layer of the model is constructed by the pixel gray value of the single-channel image as the input vector.
  • the output layer of the BP neural network initial model is constructed by the pixel defect detection results of each object to be tested as the output vector.
  • the hidden layer of the BP neural network model Constructed by the mapping relationship between the input vector and the output vector; according to the pixel gray value of the single-channel image of each object to be tested, the initial model of the BP neural network is trained through the gradient descent algorithm to obtain the BP neural network model.
  • the number of neurons in the hidden layer is set to 4.
  • the gray value of the pixel is used as the training sample, and the initial model of the BP neural network is trained according to the gray value of the normal pixel to obtain the BP neural network model.
  • the BP neural network model is constructed to carry out autonomous learning and realize automatic detection.
  • the initial model of the BP neural network is trained through the gradient descent algorithm, and the BP neural network model obtained includes: using the mean square error function mse performs error analysis on the initial model of BP neural network.
  • the BP neural network model is obtained.
  • the mean square error function mse expressed as the expected value of the square of the difference between the estimated value of the parameter and the true value of the parameter in parameter estimation, is denoted as mse.
  • the error analysis is performed, and the preset error is set to 0.10.
  • the training error converges to within 0.01, stop Train the initial model of the BP neural network to obtain the BP neural network model.
  • the number of training iterations is 1000
  • the single training error is greater than 0.01
  • the training is also stopped, and the learning rate is 0.01. It can be understood that the number of iterations and the preset error value are not the only settings, and can be selected according to actual conditions.
  • the preset error value of 0.01 and the number of iterations of 1000 are obtained through multiple experiments.
  • the value is 0.01
  • the convergence speed can be accelerated, the error shock can be reduced, and the optimal training result can be guaranteed.
  • Perform performance analysis through the mean square error function to reduce the error of the detection result and improve the accuracy of the result.
  • S110 includes:
  • S101 Collect an image of the object to be measured.
  • S102 Perform convolution processing on the image of the object to be measured to obtain a multi-scale image of the object to be measured.
  • an industrial camera such as a CCD (Charge Coupled Device) camera or a CMOS (Complementary Metal Oxide Semiconductor) camera is used to take a color image of the surface of the stainless steel plate of the object to be measured.
  • Gaussian kernel filter convolution under different scales to obtain a two-dimensional multi-scale image, and then through the cat (Concatenate) function to convert the multi-scale image into a three-dimensional multi-color image
  • the cat function is a function in matlab, used to construct Multidimensional Arrays.
  • the Gaussian kernel function is defined as a monotonic function of the Euclidean distance from any point X to a certain center point Y in space:
  • is the radial range of the function, which is called the scale parameter.
  • the address pointer is used to point to the first address of R, G, and B of the color image on the surface of stainless steel plate.
  • the multi-scale image is obtained by collecting the color image of the stainless steel steel plate and convolving the color image of the stainless steel steel plate.
  • the multi-scale image is converted into a multi-color image, and the image can be observed from multiple aspects. Makes the defect detection result more accurate.
  • performing principal component analysis on the multivariate color image to obtain a single-channel image of the object to be measured includes: expanding the multivariate color image to obtain the corresponding two-dimensional data matrix; standardizing the two-dimensional data matrix to obtain the agreement Variance matrix; perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors; perform matrix conversion according to eigenvectors and eigenvalues to obtain feature images, and there are multiple feature images; sequentially calculate the variance contribution rate of the feature images; select cumulative The feature image whose variance contribution rate reaches the preset threshold is regarded as a single-channel image.
  • the expanded two-dimensional data matrix that is, the two-dimensional multivariate image matrix X N ⁇ M can be written as:
  • the variance contribution rate refers to the variance caused by a single common factor.
  • the proportion of the total variation indicates the influence of the common factor on the dependent variable.
  • the cumulative variance contribution rate is the proportion of the variation caused by all common factors to the total variation, indicating the total influence of all common factors on the dependent variable, and the contribution rates of the differences are added. Equal to the cumulative variance contribution rate.
  • the common factor is the feature image
  • the variance contribution rate of each feature image is calculated
  • the cumulative variance contribution rate is calculated sequentially from the first feature image.
  • the cumulative variance contribution rate reaches 95%
  • the cumulative variance rate is selected
  • the multiple feature images reaching 95% are treated as multiple single-channel images.
  • the preset threshold is not limited to 95%, and a reasonable choice can be made according to the situation.
  • This embodiment can select an image with a major influence from a large number of images from multiple observation angles for detection, which improves the detection efficiency while ensuring the accuracy of the result.
  • the method further includes: S160: When the area of the color difference defect area formed by the pixel points with the color difference defect in the pixel defect detection result is greater than the preset threshold, perform the color difference defect area mark.
  • the image is composed of countless pixel permutations and combinations.
  • the BP neural network model when the pixel is defective, the BP neural network model outputs 0, and when the pixel has no defects, the BP neural network model outputs 1.
  • the result is that the area of the area formed by the pixel points of 0 is greater than the preset threshold, it is recognized as a defect area, and the defect area is highlighted on the image of the object to be tested.
  • the defect position of the object to be tested can be quickly found, the detection efficiency is improved, no manual operation is required, and the accuracy of the result is ensured.
  • the method further includes: S170: recording the number of color difference defect areas; and sending a defect warning message according to the number of color difference defect areas.
  • the warning message can include warning level information, for example, if the number of defective areas is between 1-2, it is a mild warning, the number of defective areas is between 3-5, it is a medium warning, and the number of defective areas is more than 5 is a severe warning. .
  • the warning message may include information such as stainless steel plate model information, inspection time, and inspection machine number. By sending an early warning message, it can prompt the manager to confirm and inspect the defect result, ensuring the accuracy of the automated defect inspection process.
  • an object color difference defect detection device which includes the following modules, wherein:
  • the multiple image acquisition module 310 is used to acquire multiple color images of the object to be measured
  • the single-channel image acquisition module 320 is configured to perform principal component analysis on the multi-color image to acquire a single-channel image of the object to be measured;
  • the gray value extraction module 330 is used to extract the gray value of pixels of a single-channel image
  • the pixel defect result obtaining module 340 is used to input the pixel gray value of the single-channel image into the BP neural network model constructed based on the gradient descent algorithm to obtain the pixel defect detection result;
  • the color difference defect result obtaining module 350 is configured to obtain the object color difference defect detection result of the object to be tested according to the pixel defect detection result.
  • the above-mentioned object defect detection device further includes a model construction module for constructing an initial model of the BP neural network.
  • the input layer of the initial model of the BP neural network is constructed by using the pixel gray value of the single-channel image as the input vector .
  • the output layer of the BP neural network initial model is constructed from the pixel defect detection results of each object to be tested as the output vector, and the hidden layer of the BP neural network model is constructed from the mapping relationship between the input vector and the output vector; according to each object to be tested
  • the gray value of the pixel of the single-channel image is trained on the initial model of the BP neural network through the gradient descent algorithm to obtain the BP neural network model.
  • the above-mentioned model building module is also used to use the mean square error function mse to perform error analysis on the initial model of the BP neural network, and when the error value is less than the preset error, the BP neural network model is obtained.
  • the multivariate image acquisition module 310 is also used to acquire images of the object to be measured;
  • Convolution processing is performed on the image of the object to be measured to obtain a multi-scale image of the object to be measured; the multi-scale image of the object to be measured is converted into a multi-color image of the object to be measured.
  • the single-channel image acquisition module 320 is also used to expand the multivariate color image to acquire the corresponding two-dimensional data matrix; to standardize the two-dimensional data matrix to acquire the covariance matrix; and to characterize the covariance matrix Value decomposition to obtain eigenvalues and eigenvectors; perform matrix conversion according to eigenvectors and eigenvalues to obtain feature images, which are multiple feature images; sequentially calculate the variance contribution rate of the feature image; select the features whose cumulative variance contribution rate reaches the preset threshold
  • the image is a single-channel image.
  • the above-mentioned object color difference defect detection device further includes a marking module, which is used to perform detection on the color difference defect area when the area of the color difference defect area formed by pixels with color difference defects in the pixel defect detection result is greater than a preset threshold. mark.
  • the above-mentioned object color difference defect detection device further includes an early warning module for recording the number of color difference defect areas; according to the number of color difference defect areas, a defect warning message is sent.
  • Each module in the above-mentioned object color difference defect detection device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules may be embedded in or independent of the processor in the computer equipment in the form of hardware, or stored in the memory in the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 4.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store object color difference defect detection data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize an object color difference defect detection method.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors implement the methods provided in any of the embodiments of the present application. The steps of the method for detecting color defects of objects.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors implement any one of the embodiments of the present application. Provides the steps of the detection method for object color difference defects.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

一种物体色差缺陷检测方法,方法包括:通过对多元彩色图像进行主成分分析,能对待测物体图像进行多元分析,得到待测物体的单通道图像,并将提取的单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,自动对待测物体图像的像素色差缺陷进行对比检测,根据待测物体图像的像素缺陷检测结果,得到待测物体的色差缺陷检测结果。

Description

物体色差缺陷检测方法、装置、计算机设备及存储介质
相关申请的交叉引用
本申请要求于2019年02月25日提交中国专利局,申请号为2019101359584,申请名称为“物体色差缺陷检测方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种物体色差缺陷检测方法、装置、计算机设备及存储介质。
背景技术
目前,随着机械化生产的迅猛发展,机械设备、生活用品等实现了机械化批量生产,然而某些产品设备对表面形状、颜色等要求高,通过机械化生产出来的产品需要对表面色差等缺陷进行检测,才能进行出厂。
传统的表面色差检测方法是通过安排专业的质检人员采用人工目测的作业方式,实现对待测物体表面色差缺陷进行检测。
但是采用人工目测,个人评判标准不一,易受主观因素的影响,并且人工劳动强度大,形成视觉疲劳影响检测结果,导致检测结果不准确。
发明内容
根据本申请公开的各种实施例,提供一种物体色差缺陷检测方法、装置、计算机设备及存储介质。
一种物体色差缺陷检测方法,包括:
获取待测物体的多元彩色图像;
对多元彩色图像进行主成分分析,获取待测物体的单通道图像;
提取单通道图像的像素点灰度值;
将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP(back propagation)神经网络模型,获取像素缺陷检测结果;及
根据像素缺陷检测结果,得到待测物体的物体色差缺陷检测结果。
一种物体色差缺陷检测装置,包括:
多元图像获取模块,用于获取待测物体的多元彩色图像;
单通道图像获取模块,用于对多元彩色图像进行主成分分析,获取待测物体的单通道图像;
灰度值提取模块,用于提取单通道图像的像素点灰度值;
像素缺陷结果获取模块,用于将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果;及
色差缺陷结果获取模块,用于根据像素缺陷检测结果,得到待测物体的物体色差缺陷检测结果。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取待测物体的多元彩色图像;
对多元彩色图像进行主成分分析,获取待测物体的单通道图像;
提取单通道图像的像素点灰度值;
将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP(back propagation)神经网络模型,获取像素缺陷检测结果;及
根据像素缺陷检测结果,得到待测物体的物体色差缺陷检测结果。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取待测物体的多元彩色图像;
对多元彩色图像进行主成分分析,获取待测物体的单通道图像;
提取单通道图像的像素点灰度值;
将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP(back propagation)神经网络模型,获取像素缺陷检测结果;及
根据像素缺陷检测结果,得到待测物体的物体色差缺陷检测结果。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中物体色差缺陷检测方法的流程示意图。
图2为又一个实施例中物体色差缺陷检测方法的流程示意图。
图3为根据一个或多个实施例中物体色差缺陷检测装置的框图。
图4为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进 行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
在其中一个实施例中,如图1所示,提供了一种物体色差缺陷检测方法,包括以下步骤:
S110:获取待测物体的多元彩色图像。
多元彩色图像是表示同一个对象多个不同性质的观测量,在空间上对应一致的多个通道图像数据,即在灰度值上叠加多种通道的图像,单通道图像的像素坐标与二维数据矩阵相对应,多元图像在二维的基础上增加了一维尺度信息,为三维彩色图像。其中,尺度变量可以用任何参数来表示。以待测物体为不锈钢钢板为例,获取不锈钢钢板的多元彩色图像。
S120:对多元彩色图像进行主成分分析,获取待测物体的单通道图像。
主成分分析时将多个变量通过正交变换以选出较少个数的重要变量即主成分的一种多元统计分析法,也是一种常用的降维方法。一般而言,图像包括由像素点组成的像素图,就是以单个像素点为单位有规律的巧妙组合与排列,形成的图像。图像通道在RGB色彩模式下就是指在下就是指单独的红色R、绿色G、蓝色B部分,图像一般是由红色、绿色以及蓝色三个通道组成的,三通道图像,图像的像素点都具有三个值;但图像并不仅限于三通道图像,可以是三通道图像也可以是四通道图像等多通道图像,例如CMYK模式便是4通道,4通道图像的像素点具有4个值。其中单通道图像是指每个像素都只有一个值表示颜色,可以理解为灰度图。进一步的,本实施例中,多元彩色图像为多通道的三维彩色图像,对多元彩色图像进行主成分分析,得到符合要求的单通道图像,得到的单通道图像数量可以为多个,可以理解的是,本实施例对单通道图像的数量并不做要求。
S130:提取单通道图像的像素点灰度值。
灰度值是指由于景物个点的颜色及亮度不同,拍摄成黑白照片上或电视机接收重现的黑白图像上各点呈现不同程度的灰色,把白色与黑色之间对数关系分为若干级,称为灰度等级。范围一般从0到225。在本实施例中,可以通过浮点算法、整数方法、移位方法或取平均值方法等其中任意一种方法提取单通道图像中的灰度值。
S140:将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果。
BP神经网络模型是一种按照误差逆向传播算法训练的多层前馈神经网络。其主要思想是从后向前逐层传播输出层的误差,以间接算出隐含层误差,通过第一阶段的正向过程,输入信息从输入层经隐含层逐层计算个单元的输出值,再经第二阶段的反向传播,输出误差逐层向前算出隐含层各单元之间的误差,并用误差修正前层权值。梯度下降算法是迭代法的一种,可以求解最小二乘问题,通过梯度下降算法一步一步的迭代求解,得到最小化的损失函数和模型参数。本实施例中,基于梯度下降算法构建BP神经网络模型,将单通道图像的像素点灰度值输入模型后,根据构建好的BP神经网络模型,对像素点是否合格 进行识别,当像素点有缺陷不合格时,模型输出不合格消息,当像素点无缺陷合格时,输出像素点合格消息,具体的,当识别像素点有缺陷不合格时,输出0,表示像素点异常,当像素点无缺陷合格时,输出1,表示像素点正常。
S150:根据像素缺陷检测结果,得到待测物体的色差缺陷检测结果。
像素是图像色彩的一种体现形式,当将图像的像素点逐个输入到BP神经网络模型后,识别经BP网络模型的输出结果,得到整个图像中像素点的缺陷识别结果,当像素点存在缺陷时,对缺陷像素位置进行追踪,由像素点构成的待测物体的图形呈现出来的颜色便是有色差缺陷的图像,从而不锈钢钢板表面存在色差缺陷。进一步的,当经过BP神经网络模型识别处理后,将有缺陷的像素点标记为0,将无缺陷的像素点标记为1,对像素点的标记进行识别,追踪有缺陷的像素位置,当有缺陷像素点构成的缺陷区域面积大于预设阈值时,此时不锈钢钢板表面有色差缺陷。可以理解的是,预设阈值可以在本实施例中并不做限定,可以根据生产要求的实际情况进行设置。非必要的,当得到不锈钢钢板的色差检测结果后,对不锈钢钢板的型号,以及型号对应的色差缺陷进行记录,计算不锈钢钢板的合格率,并将检测结果、记录结果、合格率等信息将发送至管理终端。
上述物体色差缺陷检测方法。通过对多元彩色图像进行主成分分析,能对待测物体图像进行多元分析,得到待测物体的单通道图像,并将提取的单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,自动对待测物体图像的像素色差缺陷进行对比检测,根据待测物体图像的像素缺陷检测结果,得到待测物体的色差缺陷检测结果,无需人工操作,进行自动化学习检测,结果准确。
在其中一个实施例中,将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果之前,还包括:构建BP神经网络初始模型,BP神经网络初始模型的输入层由单通道图像的像素点灰度值作为输入向量构建,BP神经网络初始模型的输出层由各待测物体的像素缺陷检测结果作为输出向量构建,BP神经网络模型的隐含层由输入向量和输出向量之间的映射关系构建;根据各待测物体单通道图像的像素点灰度值,通过梯度下降算法对BP神经网络初始模型进行训练,得到BP神经网络模型。
根据单通道图像的图像数量选择BP神经网络初始模型输入层的神经元个数,以获取3幅单通道图像为例,设置输入层神经元个数为3个,提取各单通道图像中像素点的灰度值,以各单通道图像中像素点的灰度值作为输出向量,构建BP神经网络初始模型的输入层;使用激活函数softmaxhan(Softmax function)函数,进行离散概率分布,将各待测物体的像素缺陷检测结果作为输出向量构建BP神经网络初始模型的输出层,且缺陷像素缺陷检测结果为合格像素和不合格像素,因此设置输出层的神经元个数为2个;根据像素点灰度值和缺陷像素之间的映射关系构建BP神经网络初始模型的隐含层,根据实验过程中获取的经验值,设置隐含层的神经元个数为4个。将像素点灰度值作为训练样本,以及根据正常像素点的灰度值对BP神经网络初始模型进行训练,得到BP神经网络模型。本实 施例中,通过构建BP神经网络模型,进行自主学习,实现自动化检测。
进一步的,在其中一个实施例中,根据各待测物体单通道图像的像素点灰度值,通过梯度下降算法对BP神经网络初始模型进行训练,得到BP神经网络模型包括:采用均方误差函数mse对BP神经网络初始模型进行误差分析,当误差值小于预设误差时,得到BP神经网络模型。其中,均方误差函数mse,表示为参数估计中是指参数估计值与参数真值之差平方的期望值,记为mse。本实施例中,根据单通道图像的像素点灰度值与正常像素点灰度值之间差平方的期望,进行误差分析,设置预设误差为0.10,当训练误差收敛到0.01以内时,停止对BP神经网络初始模型进行训练,得到BP神经网络模型,非必要的,当训练迭代次数为1000,当训练次数达到1000次单训练误差大于0.01时,也停止训练,学习率为0.01。可以理解的是迭代次数与预设误差值并不是唯一设定,可以根据实际情况进行选择,在本实施例中的预设误差值0.01以及迭代此次数1000是经过多次试验得到,在学习率为0.01时既能加快收敛速度,又能减小误差震荡,能保证最优训练结果。通过均方误差函数进行性能分析,降低检测结果误差,提高结果准确性。
在其中一个实施例中,如图2所示,S110包括:
S101:采集待测物体的图像。
S102:对待测物体的图像进行卷积处理,获取待测物体的多尺度图像。
S103:将待测物体的多尺度图像转换为待测物体的多元彩色图像。
以待测物体为不锈钢钢板为例,通过CCD(Charge Coupled Device)相机或者CMOS(Complementary Metal Oxide Semiconductor)相机等工业相机拍摄待测物体不锈钢钢板表面的彩色图像,将采集到的不锈钢钢板表面图像与不同尺度下的高斯核滤波器卷积,得到二维的多尺度图像,再通过cat(Concatenate)函数将多尺度图像转换为三维的多元彩色图像,其中cat函数matlab中的一个函数,用于构造多维数组。具体的,高斯核函数定义为空间中任意一点X到某一中心点Y之间欧氏距离的单调函数:
Figure PCTCN2019125095-appb-000001
其中,σ为函数径向作用范围,称为尺度参数。经试验得到在σ分别等于0.6、1.55以及2.55时,具有更好的区分度以及更大的信息覆盖。以不锈钢钢板彩色图像为RGB的3通道图像为例,使用地址指针分别指向不锈钢钢板表面彩色图像的R、G、B的首地址。R通道图像、G通道图像以及B通道图像分别与σ 1=0.6,σ 2=1.55,σ 3=2.55的高斯滤波器卷积,得到二维的九幅多尺度图像,再通过cat函数,以连接数组的方式将九幅二维的多尺度图像转换为一幅多元彩色图像。具体的,设f 1(x,y),f 2(x,y),...,f m(x,y)是被检测对象的M个大小为I×J像素的多尺度图像,则联结M个通道图像就可以得到I×J×M的多元图像数据 X。在本实施例中,通过对采集不锈钢钢钢板彩色图像,并对不锈钢钢钢板彩色图像进行卷积得到多尺度图像,将多尺度图像转换为多元彩色图像,能从多个方面对图像进行观测,使得检测缺陷检测结果更加准确。
在其中一个实施例中,对多元彩色图像进行主成分分析,获取待测物体的单通道图像包括:展开多元彩色图像,获取对应的二维数据矩阵;对二维数据矩阵进行标准化处理,获取协方差矩阵;对协方差矩阵进行特征值分解,获取特征值和特征向量;根据特征向量和特征值进行矩阵转换,获取特征图像,特征图像为多个;依次计算特征图像的方差贡献率;选取累计方差贡献率达到预设阈值的特征图像作为单通道图像。
对三维多元彩色图像进行主成分分析,首先将多元彩色图像的三维矩阵展开成二维数据矩阵,将多元彩色图像按照行顺序展开成像素矢量
X m=[x m1,x m2,...,x mN] T(N=I·J),
展开后的二维数据矩阵,即二维多元图像矩阵X N×M可以写成:
Figure PCTCN2019125095-appb-000002
通过标准化函数zscore对二维数据矩阵进行标准化处理,将二维数据矩阵的每一列减去对应的均值,得到均值为0,标准差为1的服从标准正态分布的样本矩阵,保证每个维度的均值为0,计算样本矩阵的协方差矩阵,例如,当二维的样本矩阵为(x 1,x 2),计算协方差矩阵为:
Figure PCTCN2019125095-appb-000003
其中,
C 11=E[X 1-E(X 1)] 2
C 12=E[X 1-E(X 1)][X 2-E(X 2)];
C 21=E[X 2-E(X 2)][X 1-E(X 1)];
C 22=E[X 2-E(X 2)] 2
通过对协方差矩阵C进行特征值分解,求取特征值λ,以及特征值对应的特征矢量w,具体的,对协方差矩阵进行特征值分解,得到特征值λ=diag[λ 12,...,λ n],和特征向量W n=[w 1,w 2,...,w n],将特征值和特征向量按照从大到小的顺序排列,取前d(d>0)个特征值λ d=diag[λ 12,...,λ d]和特征向量W d=[w 1,w 2,...,w d],作为子空间的基底,根据特征值和特征向量的大小排序,转换为特征向量矩阵,依次得到降维后的特征图像,计算每一个特征图像的方差贡献率,其中,方差贡献率是指单个公因子引起的变异占总变异的比例,说明公因子对因变量的影响力大小,累计方差贡献率是所有公因子引起的变异占总变异比例,说明所有公因子对因变量的合计影响力,各方差贡献率相加等于累计方差贡献率。在本实施例中,公因子为特征图像,计算每个特征图像的方差贡献率,从第一个特征图像开始依次计算累计方差贡献率,当累计方差贡献率达到95%时,选取累计方差率到达95% 的多个特征图像作为多个单通道图像。可以理解的是,预设阈值并不限定为95%,可以根据情况进行合理选择。本实施例能够从多观测角度的众多图像中,选取具有主要影响的图像进行检测,提高检测效率同时,保证了结果的准确性。
在其中一个实施例中,如图2所示,S150之后,还包括:S160:当像素缺陷检测结果中具有色差缺陷的像素点构成的色差缺陷区域面积大于预设阈值时,对色差缺陷区域进行标记。其中,图像是由无数个像素点排列组合构成,本实施例中,当像素点有缺陷时,BP神经网络模型输出0,当像素点无缺陷时,BP神经网络模型输出1,当识别图像中结果为0的像素点所构成的区域面积大于预设阈值时,识别为缺陷区域,在待测物体的图像上对缺陷区域进行突出标记。非必要的,将进行突出标记的待测物体图像发送至管理终端。本实施例中,通过对缺陷区域进行标记,能快速找到待测物体的缺陷位置,提高检测效率,不需人为操作,保证结果准确性。
在其中一个实施例中,如图2所示,S160之后,还包括:S170:记录色差缺陷区域的数量;根据色差缺陷区域的数量,发送缺陷预警消息。其中,预警消息可以包括预警等级信息,例如缺陷区域数量在1-2之间,为轻度预警,缺陷区域数量在3-5之间为中度预警,缺陷区域数量在5个以上为重度预警。在本实施例中,对待测物体图像上的缺陷区域进行标记后,统计图像上缺陷区域的数量,当图像上的缺陷区域数量为1时,发送轻度预警消息至管理终端。非必要的,预警消息可以包括不锈钢钢板型号信息、检测时间、检测机器号等信息。通过发送预警消息,能提示管理人员对缺陷结果的确认检查,保证自动化缺陷检查过程中的准确性。
在其中一个实施例中,如图3所示,提供了一种物体色差缺陷检测装置,包括以下模块,其中:
多元图像获取模块310,用于获取待测物体的多元彩色图像;
单通道图像获取模块320,用于对多元彩色图像进行主成分分析,获取待测物体的单通道图像;
灰度值提取模块330,用于提取单通道图像的像素点灰度值;
像素缺陷结果获取模块340,用于将单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果;
色差缺陷结果获取模块350,用于根据像素缺陷检测结果,得到待测物体的物体色差缺陷检测结果。
在其中一个实施例中,上述物体缺陷检测装置,还包括模型构建模块,用于构建BP神经网络初始模型,BP神经网络初始模型的输入层由单通道图像的像素点灰度值作为输入向量构建,BP神经网络初始模型的输出层由各待测物体的像素缺陷检测结果作为输出向量构建,BP神经网络模型的隐含层由输入向量和输出向量之间的映射关系构建;根据各待测物体单通道图像的像素点灰度值,通过梯度下降算法对BP神经网络初始模型进行训练,得到BP神经网络模型。
在其中一个实施例中,上述模型构建模块,还用于采用均方误差函数mse对BP神经网络初始模型进行误差分析,当误差值小于预设误差时,得到BP神经网络模型。
在其中一个实施例中,多元图像获取模块310,还用于采集待测物体的图像;
对待测物体的图像进行卷积处理,获取待测物体的多尺度图像;将待测物体的多尺度图像转换为待测物体的多元彩色图像。
在其中一个实施例中,单通道图像获取模块320,还用于展开多元彩色图像,获取对应的二维数据矩阵;对二维数据矩阵进行标准化处理,获取协方差矩阵;对协方差矩阵进行特征值分解,获取特征值和特征向量;根据特征向量和特征值进行矩阵转换,获取特征图像,特征图像为多个;依次计算特征图像的方差贡献率;选取累计方差贡献率达到预设阈值的特征图像作为单通道图像。
在其中一个实施例中,上述物体色差缺陷检测装置,还包括标记模块,用于当像素缺陷检测结果中具有色差缺陷的像素点构成的色差缺陷区域面积大于预设阈值时,对色差缺陷区域进行标记。
在其中一个实施例中,上述物体色差缺陷检测装置,还包括预警模块,用于记录色差缺陷区域的数量;根据色差缺陷区域的数量,发送缺陷预警消息。
关于物体色差缺陷检测装置的具体限定可以参见上文中对于物体色差缺陷检测方法的限定,在此不再赘述。上述物体色差缺陷检测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以以硬件形式内嵌于或独立于计算机设备中的处理器中,也可软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储物体色差缺陷检测数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种物体色差缺陷检测方法。
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的物体色差缺陷检测方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的物体色差缺陷检测方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种物体色差缺陷检测方法,包括:
    获取待测物体的多元彩色图像;
    对所述多元彩色图像进行主成分分析,获取所述待测物体的单通道图像;
    提取所述单通道图像的像素点灰度值;
    将所述单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果;及
    根据所述像素缺陷检测结果,得到所述待测物体的物体色差缺陷检测结果。
  2. 根据权利要求1所述物体色差缺陷检测方法,其特征在于,所述将所述单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果之前,还包括:
    构建BP神经网络初始模型,所述BP神经网络初始模型的输入层由所述单通道图像的像素点灰度值作为输入向量构建,所述BP神经网络初始模型的输出层由所述各待测物体的像素缺陷检测结果作为输出向量构建,所述BP神经网络模型的隐含层由所述输入向量和输出向量之间的映射关系构建;及
    根据所述各待测物体单通道图像的像素点灰度值,通过梯度下降算法对所述BP神经网络初始模型进行训练,得到所述BP神经网络模型。
  3. 根据权利要求2所述物体色差缺陷检测方法,其特征在于,所述根据所述各待测物体单通道图像的像素点灰度值,通过梯度下降算法对所述BP神经网络初始模型进行训练,得到所述BP神经网络模型包括:
    采用均方误差函数mse对所述BP神经网络初始模型进行误差分析,当误差值小于预设误差时,得到所述BP神经网络模型。
  4. 根据权利要求1所述物体色差缺陷检测方法,其特征在于,所述获取待测物体的多元彩色图像包括:
    采集所述待测物体的图像;
    对所述待测物体的图像进行卷积处理,获取所述待测物体的多尺度图像;及
    将所述待测物体的多尺度图像转换为所述待测物体的多元彩色图像。
  5. 根据权利要求1所述物体色差缺陷检测方法,其特征在于,所述对多元彩色图像进行主成分分析,获取单通道图像包括:
    展开所述多元彩色图像,获取对应的二维数据矩阵;
    对所述二维数据矩阵进行标准化处理,获取协方差矩阵;
    对所述协方差矩阵进行特征值分解,获取特征值和特征向量;
    根据所述特征向量和所述特征值进行矩阵转换,获取特征图像,所述特征图像为多个;
    依次计算所述特征图像的方差贡献率;及
    选取累计方差贡献率达到预设阈值的所述特征图像作为所述单通道图像。
  6. 根据权利要求1所述物体色差缺陷检测方法,其特征在于,所述根据所述像素缺陷检测结果,得到所述待测物体的物体色差缺陷检测结果之后,还包括:
    当所述像素缺陷检测结果中具有色差缺陷的像素点构成的色差缺陷区域面积大于预设阈值时,对所述色差缺陷区域进行标记。
  7. 根据权利要求6所述物体色差缺陷检测方法,其特征在于,所述当所述像素缺陷检测结果中具有色差缺陷的像素点构成的色差缺陷区域面积大于预设阈值时,对所述色差缺陷区域进行标记之后,还包括:
    记录所述色差缺陷区域的数量;及
    根据所述色差缺陷区域的数量,发送缺陷预警消息。
  8. 一种物体色差缺陷检测装置,包括:
    多元图像获取模块,用于获取待测物体的多元彩色图像;
    单通道图像获取模块,用于对所述多元彩色图像进行主成分分析,获取所述待测物体的单通道图像;
    灰度值提取模块,用于提取所述单通道图像的像素点灰度值;
    像素缺陷结果获取模块,用于将所述单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果;及
    色差缺陷结果获取模块,用于根据所述像素缺陷检测结果,得到所述待测物体的物体色差缺陷检测结果。
  9. 根据权利要求8所述的装置,其特征在于,所述多元图像获取模块还用于采集所述待测物体的图像;对所述待测物体的图像进行卷积处理,获取所述待测物体的多尺度图像;及将所述待测物体的多尺度图像转换为所述待测物体的多元彩色图像。
  10. 根据权利要求8所述的装置,其特征在于,所述单通道图像获取模块还用于展开所述多元彩色图像,获取对应的二维数据矩阵;对所述二维数据矩阵进行标准化处理,获取协方差矩阵;对所述协方差矩阵进行特征值分解,获取特征值和特征向量;根据所述特征向量和所述特征值进行矩阵转换,获取特征图像,所述特征图像为多个;依次计算所述特征图像的方差贡献率;及选取累计方差贡献率达到预设阈值的所述特征图像作为所述单通道图像。
  11. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取待测物体的多元彩色图像;
    对所述多元彩色图像进行主成分分析,获取所述待测物体的单通道图像;
    提取所述单通道图像的像素点灰度值;
    将所述单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果;及
    根据所述像素缺陷检测结果,得到所述待测物体的物体色差缺陷检测结果。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    构建BP神经网络初始模型,所述BP神经网络初始模型的输入层由所述单通道图像的像素点灰度值作为输入向量构建,所述BP神经网络初始模型的输出层由所述各待测物体的像素缺陷检测结果作为输出向量构建,所述BP神经网络模型的隐含层由所述输入向量和输出向量之间的映射关系构建;及
    根据所述各待测物体单通道图像的像素点灰度值,通过梯度下降算法对所述BP神经网络初始模型进行训练,得到所述BP神经网络模型。
  13. 根据权利要求12所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    采用均方误差函数mse对所述BP神经网络初始模型进行误差分析,当误差值小于预设误差时,得到所述BP神经网络模型。
  14. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    采集所述待测物体的图像;
    对所述待测物体的图像进行卷积处理,获取所述待测物体的多尺度图像;及
    将所述待测物体的多尺度图像转换为所述待测物体的多元彩色图像。
  15. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    展开所述多元彩色图像,获取对应的二维数据矩阵;
    对所述二维数据矩阵进行标准化处理,获取协方差矩阵;
    对所述协方差矩阵进行特征值分解,获取特征值和特征向量;
    根据所述特征向量和所述特征值进行矩阵转换,获取特征图像,所述特征图像为多个;
    依次计算所述特征图像的方差贡献率;及
    选取累计方差贡献率达到预设阈值的所述特征图像作为所述单通道图像。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取待测物体的多元彩色图像;
    对所述多元彩色图像进行主成分分析,获取所述待测物体的单通道图像;
    提取所述单通道图像的像素点灰度值;
    将所述单通道图像的像素点灰度值输入基于梯度下降算法构建的BP神经网络模型,获取像素缺陷检测结果;及
    根据所述像素缺陷检测结果,得到所述待测物体的物体色差缺陷检测结果。
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处 理器执行时还执行以下步骤:
    构建BP神经网络初始模型,所述BP神经网络初始模型的输入层由所述单通道图像的像素点灰度值作为输入向量构建,所述BP神经网络初始模型的输出层由所述各待测物体的像素缺陷检测结果作为输出向量构建,所述BP神经网络模型的隐含层由所述输入向量和输出向量之间的映射关系构建;及
    根据所述各待测物体单通道图像的像素点灰度值,通过梯度下降算法对所述BP神经网络初始模型进行训练,得到所述BP神经网络模型。
  18. 根据权利要求17所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    采用均方误差函数mse对所述BP神经网络初始模型进行误差分析,当误差值小于预设误差时,得到所述BP神经网络模型。
  19. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    采集所述待测物体的图像;
    对所述待测物体的图像进行卷积处理,获取所述待测物体的多尺度图像;及
    将所述待测物体的多尺度图像转换为所述待测物体的多元彩色图像。
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    展开所述多元彩色图像,获取对应的二维数据矩阵;
    对所述二维数据矩阵进行标准化处理,获取协方差矩阵;
    对所述协方差矩阵进行特征值分解,获取特征值和特征向量;
    根据所述特征向量和所述特征值进行矩阵转换,获取特征图像,所述特征图像为多个;
    依次计算所述特征图像的方差贡献率;及
    选取累计方差贡献率达到预设阈值的所述特征图像作为所述单通道图像。
PCT/CN2019/125095 2019-02-25 2019-12-13 物体色差缺陷检测方法、装置、计算机设备及存储介质 WO2020173177A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910135958.4A CN110930352B (zh) 2019-02-25 2019-02-25 物体色差缺陷检测方法、装置、计算机设备及存储介质
CN201910135958.4 2019-02-25

Publications (1)

Publication Number Publication Date
WO2020173177A1 true WO2020173177A1 (zh) 2020-09-03

Family

ID=69855671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/125095 WO2020173177A1 (zh) 2019-02-25 2019-12-13 物体色差缺陷检测方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110930352B (zh)
WO (1) WO2020173177A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419291A (zh) * 2020-11-30 2021-02-26 佛山职业技术学院 一种瓶胚缺陷检测模型的训练方法、存储介质及终端设备
CN114240929A (zh) * 2021-12-28 2022-03-25 季华实验室 一种色差检测方法及装置
CN114463587A (zh) * 2022-01-30 2022-05-10 中国农业银行股份有限公司 一种异常数据检测方法、装置、设备及存储介质
CN114926723A (zh) * 2022-06-10 2022-08-19 国网江苏省电力有限公司电力科学研究院 一种输电线路周边干扰物识别与报警触发方法、终端及存储介质
CN115824978A (zh) * 2022-06-06 2023-03-21 宁德时代新能源科技股份有限公司 测量胶体原料混合比例的方法及装置
CN116822341A (zh) * 2023-06-12 2023-09-29 华中科技大学 一种基于三维铸件模型特征提取的缺陷预测方法及系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111707692A (zh) * 2020-07-17 2020-09-25 碳升技术服务(北京)有限公司 汽车零部件的缺陷检测方法、系统及电子设备
CN112270663B (zh) * 2020-10-27 2023-11-24 北京京能东方建设工程有限公司 基于蜂巢网络环境的沥青路面过筛修复系统
CN112446865A (zh) * 2020-11-25 2021-03-05 创新奇智(广州)科技有限公司 瑕疵识别方法、装置、设备和存储介质
CN112446864A (zh) * 2020-11-25 2021-03-05 创新奇智(合肥)科技有限公司 瑕疵检测方法、装置、设备和存储介质
CN113780881A (zh) * 2021-09-26 2021-12-10 广域铭岛数字科技有限公司 一种涂装色差溯源方法、系统、介质及终端
CN117593651B (zh) * 2024-01-18 2024-04-05 四川交通职业技术学院 一种隧道裂纹分割识别方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130114879A1 (en) * 2011-11-09 2013-05-09 Pratt & Whitney Method and System for Automated Defect Detection
CN105938563A (zh) * 2016-04-14 2016-09-14 北京工业大学 一种基于图像纹理的焊缝表面缺陷识别方法
CN106841212A (zh) * 2016-12-30 2017-06-13 湖南大学 一种基于局部pca和bp神经网络的瓶口缺陷检测方法
CN107730500A (zh) * 2017-11-01 2018-02-23 广东工业大学 一种瓷砖纹理检测方法、系统、装置及可读存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1746901A (zh) * 2005-09-19 2006-03-15 南京大学 肺癌早期细胞涂片彩色图像信息的计算机智能化处理的方法及其处理设备
CN102279976A (zh) * 2011-09-22 2011-12-14 河南工业大学 不同糙米籽粒识别的bp神经网络构建及识别方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130114879A1 (en) * 2011-11-09 2013-05-09 Pratt & Whitney Method and System for Automated Defect Detection
CN105938563A (zh) * 2016-04-14 2016-09-14 北京工业大学 一种基于图像纹理的焊缝表面缺陷识别方法
CN106841212A (zh) * 2016-12-30 2017-06-13 湖南大学 一种基于局部pca和bp神经网络的瓶口缺陷检测方法
CN107730500A (zh) * 2017-11-01 2018-02-23 广东工业大学 一种瓷砖纹理检测方法、系统、装置及可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN, PING: "Research on Strip Steel Surface Defects Inspection Algorithm Based on Machine Vision", CHINESE MASTER’S THESES FULL-TEXT DATABASE, INFORMATION SCIENCE, 15 December 2010 (2010-12-15), ISSN: 1674-0246, DOI: 20200218115244Y *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419291A (zh) * 2020-11-30 2021-02-26 佛山职业技术学院 一种瓶胚缺陷检测模型的训练方法、存储介质及终端设备
CN112419291B (zh) * 2020-11-30 2024-06-04 佛山职业技术学院 一种瓶胚缺陷检测模型的训练方法、存储介质及终端设备
CN114240929A (zh) * 2021-12-28 2022-03-25 季华实验室 一种色差检测方法及装置
CN114463587A (zh) * 2022-01-30 2022-05-10 中国农业银行股份有限公司 一种异常数据检测方法、装置、设备及存储介质
CN115824978A (zh) * 2022-06-06 2023-03-21 宁德时代新能源科技股份有限公司 测量胶体原料混合比例的方法及装置
CN114926723A (zh) * 2022-06-10 2022-08-19 国网江苏省电力有限公司电力科学研究院 一种输电线路周边干扰物识别与报警触发方法、终端及存储介质
CN114926723B (zh) * 2022-06-10 2024-05-28 国网江苏省电力有限公司电力科学研究院 一种输电线路周边干扰物识别与报警触发方法、终端及存储介质
CN116822341A (zh) * 2023-06-12 2023-09-29 华中科技大学 一种基于三维铸件模型特征提取的缺陷预测方法及系统

Also Published As

Publication number Publication date
CN110930352A (zh) 2020-03-27
CN110930352B (zh) 2024-02-13

Similar Documents

Publication Publication Date Title
WO2020173177A1 (zh) 物体色差缺陷检测方法、装置、计算机设备及存储介质
WO2021000524A1 (zh) 孔位保护门检测方法、装置、计算机设备和存储介质
US11062458B2 (en) Appearance inspection device, transformation data generation device, and program
CN112241699B (zh) 物体缺陷类别识别方法、装置、计算机设备和存储介质
CN111680746B (zh) 车损检测模型训练、车损检测方法、装置、设备及介质
JP2012032370A (ja) 欠陥検出方法、欠陥検出装置、学習方法、プログラム、及び記録媒体
JP7131617B2 (ja) 照明条件を設定する方法、装置、システム及びプログラム並びに記憶媒体
JP6702064B2 (ja) 外観異常検査装置、方法、及びプログラム
CN110307903B (zh) 一种家禽特定部位无接触温度动态测量的方法
CN110596120A (zh) 玻璃边界缺陷检测方法、装置、终端及存储介质
JP7412556B2 (ja) 目標コーティング中の効果顔料を識別する方法及び装置
CN110929944A (zh) 基于高光谱图像与光谱特征相融合技术的小麦赤霉病病情严重度预测方法
CN110991493A (zh) 一种协同表示和异常剔除的高光谱异常检测方法
JP2010008159A (ja) 外観検査処理方法
CN117455917A (zh) 一种蚀刻引线框架误报库建立及误报在线判定筛选方法
CN111238927A (zh) 疲劳耐久性评测方法、装置、电子设备和计算机可读介质
CN110751623A (zh) 基于联合特征的缺陷检测方法、装置、设备及存储介质
US20240005477A1 (en) Index selection device, information processing device, information processing system, inspection device, inspection system, index selection method, and index selection program
CN114782822A (zh) 电力设备的状态检测方法、装置、电子设备及存储介质
Batin et al. Improved detection and analysis of wheat spikes u sing multi-stage convolutional neural network
Yelmanov et al. A method for rapid quantitative assessment of incomplete integral contrast for complex images
CN117474915B (zh) 一种异常检测方法、电子设备及存储介质
Yelmanov et al. A generalized description for the perceived contrast of image elements
TWI609352B (zh) 紙式檢測裝置之顏色辨識方法
KR102595182B1 (ko) 이미지 이상 탐지 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19916915

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19916915

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19916915

Country of ref document: EP

Kind code of ref document: A1