CN116465840A - A device and method for quickly identifying the age of tangerine peel - Google Patents
A device and method for quickly identifying the age of tangerine peel Download PDFInfo
- Publication number
- CN116465840A CN116465840A CN202310558741.0A CN202310558741A CN116465840A CN 116465840 A CN116465840 A CN 116465840A CN 202310558741 A CN202310558741 A CN 202310558741A CN 116465840 A CN116465840 A CN 116465840A
- Authority
- CN
- China
- Prior art keywords
- sample
- image
- light source
- tested
- year
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/255—Details, e.g. use of specially adapted sources, lighting or optical systems
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
- G01N2021/0106—General arrangement of respective parts
- G01N2021/0112—Apparatus in one mechanical, optical or electronic block
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P60/00—Technologies relating to agriculture, livestock or agroalimentary industries
- Y02P60/80—Food processing, e.g. use of renewable energies or variable speed drives in handling, conveying or stacking
- Y02P60/87—Re-use of by-products of food processing for fodder production
Landscapes
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
本申请提供一种陈皮年份快速鉴别的装置及方法,涉及药材检测技术领域,包括多光谱相机、光源、分别与多光谱相机、光源电连接的处理器,光源包括多颗不同波长且强度可调节的LED灯珠;光源在调节到与待测样本满足预设距离和角度关系后朝向位于目标区域的待测样本出射光束,多光谱相机分别接收多颗LED灯珠的光束照射待测样本后反射的光束并将不同波长光照下的检测信息反馈给处理器,处理器分析计算并输出待测样本的年份结果,多光谱相机与待测样本的距离满足预设要求。通过调节装置的参数评估成像效果,使装置处于最佳状态下对待测样本进行年份鉴别,提高结果的准确性;实现快速、无损、非接触、低成本、低使用门槛的陈皮年份鉴别。
The application provides a device and method for quickly identifying the age of tangerine peel, which relates to the technical field of medicinal material detection, including a multi-spectral camera, a light source, and a processor electrically connected to the multi-spectral camera and the light source. The light source includes a plurality of LED lamp beads with different wavelengths and adjustable intensities; the light source is adjusted to meet the preset distance and angle relationship with the sample to be tested. The year results of the sample, the distance between the multispectral camera and the sample to be tested meet the preset requirements. The imaging effect is evaluated by adjusting the parameters of the device, so that the device is in the best state to identify the age of the sample to be tested, and improve the accuracy of the results; realize fast, non-destructive, non-contact, low-cost, and low-use threshold identification of the age of tangerine peel.
Description
技术领域technical field
本申请涉及药材检测技术领域,具体涉及一种陈皮年份快速鉴别的装置及方法。The application relates to the technical field of medicinal material detection, and in particular to a device and method for rapidly identifying the age of tangerine peel.
背景技术Background technique
陈皮是由成熟柑橘皮经长时间干制存储而成的食物和药用产品,其存储时间越长,药用价值越高;因此,为谋取利益,市场上目前存在以低年份陈皮冒充高年份陈皮进行售卖的现象。为此,需要对陈皮的年份进行鉴别。Chenpi is a food and medicinal product made from mature citrus peels dried and stored for a long time. The longer the storage time, the higher the medicinal value; For this reason, it is necessary to identify the age of tangerine peel.
当前用于陈皮年份鉴别的方法主要有两种:一种是传统的感官鉴别方法,这种方法是通过陈皮的外观和气味特征判断陈皮的年份。感官鉴别方法由于比较方便快捷,仍是陈皮年份鉴别的常用方法,但该方法依赖于鉴别者的经验,具有较强的主观性、随机性,难以非常准确地鉴别陈皮的年份。另一种是理化分析鉴别方法,这种方法是采用一些物理和化学手段、采用特定试剂和仪器对待测陈皮进行处理分析。理化分析鉴别方法能够得到比较精确的分析结果,但是需要专业的技术人员和实验设备,且分析流程复杂、耗时长、成本高,很难在现实生活中进行大范围推广使用。Currently, there are mainly two methods for identifying the age of tangerine peel: a kind of traditional sensory identification method, which is to judge the age of tangerine peel by its appearance and smell characteristics. The sensory identification method is still a common method for identifying the age of tangerine peel because it is more convenient and quick, but this method relies on the experience of the appraiser, has strong subjectivity and randomness, and is difficult to identify the age of tangerine peel very accurately. Another kind is physical and chemical analysis identification method, and this method adopts some physical and chemical means, adopts specific reagent and instrument to process and analyze the dried orange peel to be tested. Physical and chemical analysis and identification methods can obtain relatively accurate analysis results, but they require professional technicians and experimental equipment, and the analysis process is complex, time-consuming, and costly, making it difficult to widely promote and use in real life.
发明内容Contents of the invention
本申请实施例的目的在于提供一种陈皮年份快速鉴别的装置及方法,能够快速、方便、准确的对陈皮年份进行鉴别。The purpose of the embodiment of the present application is to provide a device and method for quickly identifying the age of orange peel, which can quickly, conveniently and accurately identify the age of orange peel.
本申请实施例的一方面,提供了一种陈皮年份快速鉴别的装置,包括多光谱相机、光源,以及分别与所述多光谱相机、所述光源电连接的处理器,所述光源包括多颗不同波长且强度可调节的LED灯珠;所述光源在调节到与待测样本满足预设距离和角度关系后朝向位于目标区域的所述待测样本出射光束,所述多光谱相机分别接收多颗所述LED灯珠的光束照射所述待测样本后反射的光束并将不同波长光照下的检测信息反馈给所述处理器,所述处理器分析计算并输出所述待测样本的年份结果,其中,所述多光谱相机与所述待测样本的距离满足预设要求。An aspect of the embodiment of the present application provides a device for quickly identifying the age of tangerine peel, including a multispectral camera, a light source, and a processor electrically connected to the multispectral camera and the light source, the light source includes a plurality of LED beads with different wavelengths and adjustable intensities; the light source is adjusted to meet the preset distance and angle relationship with the sample to be tested, and then emits a beam toward the sample to be tested in the target area. The processor analyzes and calculates and outputs the year result of the sample to be tested, wherein the distance between the multispectral camera and the sample to be tested meets a preset requirement.
可选地,还包括暗箱,所述多光谱相机和所述光源均设置于所述暗箱内;所述暗箱内还设置有载物台,所述载物台上预设有所述目标区域,所述待测样本置于所述目标区域内。Optionally, a dark box is also included, and the multispectral camera and the light source are both arranged in the dark box; an object stage is also arranged in the dark box, and the target area is preset on the object table, and the sample to be tested is placed in the target area.
本申请实施例的另一方面,提供了一种陈皮年份快速鉴别的方法,应用于上述的陈皮年份快速鉴别的装置中的处理器,该方法包括:根据预设算法调节所述光源与所述待测样本之间的角度和距离,以使所述光源与所述待测样本满足预设距离和角度关系;Another aspect of the embodiment of the present application provides a method for quickly identifying the age of tangerine peel, which is applied to the processor in the above-mentioned device for quickly identifying the age of tangerine peel. The method includes: adjusting the angle and distance between the light source and the sample to be tested according to a preset algorithm, so that the light source and the sample to be tested meet the preset distance and angle relationship;
所述光源与所述待测样本满足预设距离和角度关系后,使光源中的多颗LED灯珠分别朝向位于目标区域的待测样本出射光束;After the light source and the sample to be tested satisfy the preset distance and angle relationship, multiple LED lamp beads in the light source respectively emit light beams towards the sample to be tested located in the target area;
通过多光谱相机分别接收多颗所述LED灯珠的光束照射所述待测样本后反射的光束,以得到所述待测样本在不同波长光照下的原始光谱图像数据,其中,所述多光谱相机与所述待测样本的距离满足预设要求;receiving light beams reflected by the light beams of a plurality of LED lamp beads after irradiating the sample to be tested through a multi-spectral camera, so as to obtain original spectral image data of the sample to be tested under illumination of different wavelengths, wherein the distance between the multi-spectral camera and the sample to be tested meets preset requirements;
根据所述原始光谱图像数据进行感兴趣区域提取操作,得到感兴趣区域数据;performing a region-of-interest extraction operation according to the original spectral image data to obtain region-of-interest data;
根据所述感兴趣区域数据输入陈皮年份鉴定模型,得到待测样本的年份。According to the data of the region of interest, input the age identification model of orange peel to obtain the age of the sample to be tested.
可选地,所述方法还包括:Optionally, the method also includes:
调节所述多光谱相机和所述目标区域之间的距离,使所述多光谱相机采集的画面能够覆盖所述目标区域以满足所述预设要求。Adjusting the distance between the multispectral camera and the target area, so that the images collected by the multispectral camera can cover the target area to meet the preset requirements.
可选地,所述根据预设算法调节所述光源与所述待测样本之间的角度和距离,以使所述光源与所述待测样本满足预设距离和角度关系,包括:Optionally, the adjusting the angle and distance between the light source and the sample to be tested according to a preset algorithm, so that the light source and the sample to be tested meet a preset distance and angle relationship, comprising:
在调节所述光源与所述待测样本之间的角度和距离过程中,通过所述多光谱相机采集所述目标区域中标准反射白板的标准光谱图像;During the process of adjusting the angle and distance between the light source and the sample to be tested, collecting a standard spectral image of a standard reflective whiteboard in the target area through the multispectral camera;
根据所述标准反射白板的光谱图像以及公式计算确定所述光源与所述待测样本之间的角度和距离是否满足预设距离和角度关系;其中,表示第i个波长下图像的灰度值方差,为第i个波长下图像的灰度值均值,W、H分别为所述目标区域宽和高的像素数量,fi(x,y)表示第i个波长下图像在坐标(x,y)处的灰度值。According to the spectral image of the standard reflective whiteboard and the formula Calculating to determine whether the angle and distance between the light source and the sample to be tested satisfy the preset distance and angle relationship; wherein, Indicates the variance of the gray value of the image at the i-th wavelength, is the average gray value of the image at the i-th wavelength, W and H are the number of pixels in the width and height of the target area respectively, f i (x, y) represents the gray-scale value of the image at the coordinates (x, y) at the i-th wavelength.
可选地,所述根据预设算法调节所述光源与所述待测样本之间的角度和距离,以使所述光源与所述待测样本满足预设距离和角度关系之后,所述方法还包括:Optionally, after adjusting the angle and distance between the light source and the sample to be tested according to a preset algorithm, so that the light source and the sample to be tested meet the preset distance and angle relationship, the method further includes:
调节所述多光谱相机的曝光参数,使成像画面的所述目标区域中有不超过5%的像素点的灰度值达到最大值或最小值。Adjusting the exposure parameters of the multi-spectral camera, so that the gray value of no more than 5% of the pixels in the target area of the imaging picture reaches the maximum value or the minimum value.
可选地,所述通过多光谱相机分别接收多颗LED灯珠的光束照射所述待测样本后反射的光束,以得到所述待测样本在不同波长光照下的原始光谱图像数据,包括:Optionally, the multi-spectral camera respectively receives the light beams reflected by the light beams of multiple LED lamp beads after irradiating the sample to be tested, so as to obtain the original spectral image data of the sample to be tested under different wavelengths of illumination, including:
接收所述多光谱相机反馈的所述待测样本在多个不同波段的光束,以获取所述待测样本在多个不同波段的原始光谱图像数据。receiving the light beams of the sample to be tested in multiple different bands fed back by the multispectral camera, so as to acquire the original spectral image data of the sample to be tested in multiple different bands.
可选地,所述通过多光谱相机分别接收多颗所述LED灯珠的光束照射所述待测样本后反射的光束,以得到所述待测样本在不同波长光照下的原始光谱图像数据之后,所述方法还包括:Optionally, after receiving the reflected light beams of the plurality of LED light beads by the multi-spectral camera after irradiating the sample to be tested, so as to obtain the original spectral image data of the sample to be tested under illumination of different wavelengths, the method further includes:
通过ORB特征检测模块分别提取多个不同波段的所述原始光谱图像数据的关键点特征;The key point features of the original spectral image data of a plurality of different bands are respectively extracted by the ORB feature detection module;
采用蛮力匹配模块对所述关键点特征进行匹配,使多个不同波段的所述原始光谱图像数据的关键点特征重合;Using a brute force matching module to match the key point features, so that the key point features of the original spectral image data of a plurality of different bands overlap;
根据匹配的所述关键点特征对所述原始光谱图像数据进行转换,实现多个不同波段的所述原始光谱图像数据的像素级对齐,得到多个配准转换后的光谱图像。The original spectral image data is converted according to the matched key point features, so as to realize pixel-level alignment of the original spectral image data in multiple different bands, and obtain multiple registered and transformed spectral images.
可选地,在所述目标区域放置一块反射率已知的标准反射白板以替换所述待测样本;所述根据匹配的所述关键点特征对所述原始光谱图像数据进行转换,实现多个不同波段的所述原始光谱图像数据的像素级对齐,得到多个转换后的图像之后,所述方法还包括:Optionally, placing a standard reflective whiteboard with known reflectivity in the target area to replace the sample to be tested; converting the original spectral image data according to the matched key point features to achieve pixel-level alignment of the original spectral image data in multiple different bands, and after obtaining multiple converted images, the method further includes:
在和拍摄所述待测样本相同的拍摄条件下,采用镜头盖遮住所述多光谱相机的镜头,获取所述多光谱相机的暗电流数据;Under the same shooting conditions as shooting the sample to be tested, cover the lens of the multispectral camera with a lens cover, and obtain dark current data of the multispectral camera;
去除所述镜头盖后,获取所述多光谱相机反馈的标准反射白板的标准光谱图像;After removing the lens cover, obtain the standard spectral image of the standard reflective whiteboard fed back by the multispectral camera;
根据所述标准反射白板的标准光谱图像,通过公式I1=(I0-B)/((W-B)/r)计算得到反射率校正后的光谱图像;其中,I1是校正后的光谱图像数据,I0是配准转换后的光谱图像数据,B是暗电流数据,W是所述标准反射白板数据,r是所述标准反射白板的反射率。According to the standard spectral image of the standard reflective whiteboard, the reflectance-corrected spectral image is calculated by the formula I1 =( I0 -B)/((WB)/r); wherein, I1 is the corrected spectral image data, I0 is the spectral image data after registration conversion, B is the dark current data, W is the standard reflective whiteboard data, and r is the reflectance of the standard reflective whiteboard.
可选地,所述根据所述原始光谱图像数据进行感兴趣区域提取操作,得到感兴趣区域数据,包括:Optionally, performing the region-of-interest extraction operation according to the original spectral image data to obtain the region-of-interest data includes:
随机复制任一个波段下的所述反射率校正后的光谱图像用于制作蒙版,并采用中值滤波方法对蒙版图像进行降噪;randomly copying the reflectance-corrected spectral image under any band for making a mask, and using a median filter method to denoise the mask image;
通过自适应阈值分割的方法将所述蒙版图像二值化,以划分出背景区域和待测样本图像区域;binarizing the mask image by an adaptive threshold segmentation method to divide the background area and the sample image area to be tested;
对二值化的所述蒙版图像依次进行开运算和闭运算的形态学处理,消除所述背景区域中的白点和所述待测样本图像区域中的黑点;performing morphological processing of opening and closing operations on the binarized mask image in turn, eliminating white spots in the background area and black spots in the sample image area to be tested;
从所述蒙版图像提取得到所述待测样本图像区域的外包框;Extracting from the mask image to obtain the outer frame of the sample image area to be tested;
选取所述外包框中心40%~50%的区域作为所述待测样本图像区域的感兴趣区域;Selecting 40% to 50% of the center of the outer frame as the region of interest of the sample image region to be tested;
基于所述蒙版图像的坐标对反射率校正后的多个光谱图像数据进行裁切,提取出感兴趣区域数据。Based on the coordinates of the mask image, the reflectance-corrected multiple spectral image data are cropped to extract the data of the region of interest.
可选地,所述根据所述感兴趣区域数据输入陈皮年份鉴定模型,得到待测样本的年份,包括:Optionally, the input of the orange peel age identification model according to the data of the region of interest to obtain the year of the sample to be tested includes:
采用1*1卷积层对输入的光谱图像通道数进行降维;Use 1*1 convolutional layer to reduce the dimension of the input spectral image channel number;
通过图像特征提取网络模块提取图像特征,所述图像特征为图像一维向量;Extract image feature by image feature extraction network module, described image feature is image one-dimensional vector;
采用核大小为9*9的平均池化层对输入光谱图像的像素数进行降维;Use an average pooling layer with a kernel size of 9*9 to reduce the number of pixels in the input spectral image;
通过1*1卷积调整所述图像通道数、进行不同波长所代表的图像通道间的特征提取和特征组合,以得到三维特征图像;Adjusting the number of image channels by 1*1 convolution, performing feature extraction and feature combination between image channels represented by different wavelengths, to obtain a three-dimensional feature image;
将输出的所述三维特征图像按像素点依次取出后,重新排列成二维的特征向量组;After taking out the outputted three-dimensional feature images sequentially by pixels, rearranging them into two-dimensional feature vector groups;
将所述二维的特征向量组输入到光谱特征提取网络模块提取光谱特征,所述光谱特征为光谱一维向量;The two-dimensional feature vector group is input to the spectral feature extraction network module to extract spectral features, and the spectral features are spectral one-dimensional vectors;
将所述图像一维向量和所述光谱一维向量拼接;splicing the image one-dimensional vector and the spectrum one-dimensional vector;
经过全连接层和Softmax激活函数得到待测样本的年份概率分布。The year probability distribution of the sample to be tested is obtained through the fully connected layer and the Softmax activation function.
本申请实施例提供的陈皮年份快速鉴别的装置及方法,通过光源照射待测样本,多光谱相机接收待测样本反射的光束并将检测信息反馈给处理器,处理器分析计算并输出待测样本的年份结果;其中,光源包括多颗不同波长且强度可调节的LED灯珠,通过调节各个波长的灯珠的光照强度来调节整个光源的光强随波长的分布,以达到最优的照明效果;光源需调节到与待测样本满足预设距离和角度关系,多光谱相机与待测样本的距离满足预设要求后,再使用本装置对待测样本进行年份鉴别,通过调节装置的参数,以评估成像效果,使得装置处于最佳状态下对待测样本进行年份鉴别,以提高待测样本的年份结果的准确性;此外,通过本装置进行待测样本的年份鉴别时,不需接触待测样本,实现无损、非接触的检测,且检测速度快、成本低、使用门槛低,适用范围广,成为一种方便、快速的陈皮年份鉴别手段。The device and method for quickly identifying the age of tangerine peel provided by the embodiments of the present application irradiates the sample to be tested with a light source, and the multispectral camera receives the beam reflected by the sample to be tested and feeds back the detection information to the processor. After the distance meets the preset requirements, use this device to identify the age of the sample to be tested. By adjusting the parameters of the device to evaluate the imaging effect, the device is in the best state to identify the age of the sample to be tested, so as to improve the accuracy of the year of the sample to be tested. In addition, when the device is used to identify the age of the sample to be tested, there is no need to touch the sample to be tested, and non-destructive, non-contact detection is realized. The detection speed is fast, the cost is low, and the threshold for use is low.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without creative work.
图1是本实施例提供的陈皮年份快速鉴别的装置结构示意图;Fig. 1 is the device structure schematic diagram of the rapid identification of the age of orange peel provided by the present embodiment;
图2是本实施例提供的陈皮年份快速鉴别的方法流程图之一;Fig. 2 is one of the method flowcharts of the rapid identification of the year of orange peel provided by the present embodiment;
图3是本实施例提供的陈皮年份快速鉴别的方法流程图之二。Fig. 3 is the second flow chart of the method for quickly identifying the age of orange peel provided in this embodiment.
图标:10-暗箱;100-多光谱相机;101-光源;102-载物台;200-待测样本。Icons: 10-obscura; 100-multispectral camera; 101-light source; 102-stage; 200-sample to be tested.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
在本申请的描述中,需要说明的是,术语“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,或者是该申请产品使用时惯常摆放的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In the description of this application, it should be noted that the orientation or positional relationship indicated by the terms "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship that is usually placed when the product of the application is used. It is only for the convenience of describing the application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the application. In addition, the terms "first", "second", etc. are only used for distinguishing descriptions, and should not be construed as indicating or implying relative importance.
还需要说明的是,除非另有明确的规定和限定,术语“设置”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。It should also be noted that, unless otherwise clearly specified and limited, the terms "setting" and "connection" should be understood in a broad sense, for example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a direct connection, or an indirect connection through an intermediary, or an internal connection between two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in this application in specific situations.
现有对于陈皮年份的鉴别方法中,感官鉴别方法的缺点是依赖于人的经验,具有较强的主观性、随机性,难以非常准确地鉴别陈皮的年份;而理化分析鉴别方法,其缺点是需要专业的技术人员和实验设备,分析流程复杂、耗时长、成本高,很难在现实生活中进行广泛使用。Among the existing identification methods for the age of tangerine peel, the disadvantage of the sensory identification method is that it depends on human experience, has strong subjectivity and randomness, and is difficult to identify the age of tangerine peel very accurately; and the physical and chemical analysis identification method has the disadvantage of requiring professional technicians and experimental equipment. The analysis process is complicated, time-consuming, and costly, and it is difficult to be widely used in real life.
有鉴于此,为解决上述问题,本申请实施例提供一种陈皮年份快速鉴别的装置及方法,能够进行快速、无损、非接触、低成本、低使用门槛的陈皮年份鉴别。In view of this, in order to solve the above problems, the embodiment of the present application provides a device and method for quickly identifying the age of tangerine peel, which can perform rapid, non-destructive, non-contact, low-cost, and low-use threshold identification of the age of tangerine peel.
具体地,请参照图1所示,本申请实施例的一方面,提供一种陈皮年份快速鉴别的装置(下述可简称装置),包括:多光谱相机100、光源101,以及分别与多光谱相机100、光源101电连接的处理器,光源101包括多颗不同波长且强度可调节的LED灯珠;光源101在调节到与待测样本200满足预设距离和角度关系后朝向位于目标区域的待测样本200出射光束,多光谱相机100分别接收多颗LED灯珠的光束照射待测样本200后反射的光束并将不同波长光照下的检测信息反馈给处理器,处理器分析计算并输出待测样本200的年份结果,其中,多光谱相机100与待测样本200的距离满足预设要求。Specifically, as shown in FIG. 1 , an aspect of the embodiment of the present application provides a device for quickly identifying the age of tangerine peel (hereinafter referred to as the device), including: a multispectral camera 100, a light source 101, and a processor electrically connected to the multispectral camera 100 and the light source 101 respectively. The camera 100 respectively receives the light beams reflected by the light beams of multiple LED lamp beads irradiating the sample 200 to be tested and feeds back the detection information under different wavelengths of light to the processor. The processor analyzes and calculates and outputs the year results of the sample 200 to be tested, wherein the distance between the multispectral camera 100 and the sample 200 to be tested meets the preset requirements.
通过上述装置建立多光谱成像系统,其中,多光谱相机100基于MEMS芯片开发,能够快速获取多个不同波段下的光谱图像。光源101由多颗不同波长的、强度可调节的LED灯珠交叉排列组成,可以通过调节各个波长的灯珠的光照强度来调节整个光源101的光强随波长的分布,以达到最优的照明效果。A multi-spectral imaging system is established through the above-mentioned device, wherein the multi-spectral camera 100 is developed based on a MEMS chip, and can quickly acquire spectral images in multiple different bands. The light source 101 is composed of multiple LED lamp beads with different wavelengths and whose intensity can be adjusted in a cross arrangement. By adjusting the light intensity of the lamp beads of each wavelength, the distribution of the light intensity of the entire light source 101 with wavelength can be adjusted to achieve the optimal lighting effect.
示例地,本申请中多光谱相机100竖直放置于待测样本200上方,光源101有两个,分别对称设置在待测样本200上方的两侧;通过装置进行鉴别时,光源101朝向待测样本200出射光束,待测样本200接收光束后进行反射,将反射的光束反射向多光谱相机100,多光谱相机100通过光束得到待测样本200的检测信息,并将检测信息反馈给处理器,处理器通过分析计算得到待测样本200的年份结果并输出,以此获知待测样本200的年份结果。For example, in the present application, the multispectral camera 100 is placed vertically above the sample to be tested 200, and there are two light sources 101, which are symmetrically arranged on both sides above the sample to be tested 200; when the device is used for identification, the light source 101 emits a beam toward the sample to be tested 200, and the sample to be tested 200 reflects the beam after receiving it, and reflects the reflected beam to the multispectral camera 100. The year result of the sample to be tested 200 is obtained and output, so as to obtain the year result of the sample to be tested 200 .
需要说明的是,上述装置在使用过程中,在对待测样本200进行鉴别之前,先需要调节光源101和待测样本200、多光谱相机100和待测样本200之间的位置,以此调节多光谱成像系统的参数,评估成像效果;具体地,光源101和待测样本200之间要满足预设距离和角度关系,以使光照效果处于最佳状态;同样地,多光谱相机100与待测样本200的距离满足预设要求,使得装置能在最佳状态下对待测样本200进行鉴别。It should be noted that, during the use of the above-mentioned device, before the identification of the sample 200 to be tested, the position between the light source 101 and the sample to be tested 200, the multispectral camera 100 and the sample to be tested 200 needs to be adjusted, so as to adjust the parameters of the multispectral imaging system and evaluate the imaging effect; specifically, the preset distance and angle relationship between the light source 101 and the sample to be tested 200 should be satisfied, so that the lighting effect is in the best state; similarly, the distance between the multispectral camera 100 and the sample to be tested 200 meets the preset requirements, so that The device can identify the sample 200 to be tested under the best condition.
除此之外,装置还包括暗箱10,多光谱相机100和光源101均设置于暗箱10内;暗箱10内还设置有载物台102,载物台102上预设有目标区域,待测样本200置于目标区域内。In addition, the device also includes a dark box 10, in which the multispectral camera 100 and the light source 101 are both arranged; in the dark box 10, a stage 102 is also arranged, and a target area is preset on the stage 102, and the sample 200 to be tested is placed in the target area.
暗箱10采用黑色不透明板材组装,以减少外界环境对成像系统的干扰;暗箱10底部为一块带孔黑色金属平台,其上可安装支撑杆及支架,用于固定多光谱相机100和光源101;载物台102上预设目标区域以用于放置待测样本200,放置面为黑色。The black box 10 is assembled with black opaque boards to reduce the interference of the external environment on the imaging system; the bottom of the dark box 10 is a black metal platform with holes, on which support rods and brackets can be installed for fixing the multispectral camera 100 and the light source 101; the preset target area on the stage 102 is used to place the sample 200 to be tested, and the placement surface is black.
由此,本申请实施例提供的陈皮年份快速鉴别的装置,通过光源101照射待测样本200,多光谱相机100接收待测样本200反射的光束并将检测信息反馈给处理器,处理器分析计算并输出待测样本200的年份结果;其中,光源101包括多颗不同波长且强度可调节的LED灯珠,通过调节各个波长的灯珠的光照强度来调节整个光源101的光强随波长的分布,以达到最优的照明效果;光源101需调节到与待测样本200满足预设距离和角度关系,多光谱相机100与待测样本200的距离满足预设要求后,再使用本装置对待测样本200进行年份鉴别,通过调节装置的参数,以评估成像效果,使得装置处于最佳状态下对待测样本200进行年份鉴别,以提高待测样本200的年份结果的准确性;此外,通过本装置进行待测样本200的年份鉴别时,不需接触待测样本200,实现无损、非接触的检测,且检测速度快、成本低、使用门槛低,适用范围广,成为一种方便、快速的陈皮年份鉴别手段。Therefore, the device for quickly identifying the age of orange peel provided in the embodiment of the present application irradiates the sample 200 to be tested through the light source 101, the multispectral camera 100 receives the light beam reflected by the sample 200 to be tested and feeds back the detection information to the processor, and the processor analyzes and calculates and outputs the year result of the sample 200 to be tested; wherein, the light source 101 includes a plurality of LED lamp beads with different wavelengths and whose intensity can be adjusted. 101 needs to be adjusted to meet the preset distance and angle relationship with the sample to be tested 200. After the distance between the multispectral camera 100 and the sample to be tested 200 meets the preset requirements, the device is used to identify the year of the sample to be tested 200, and the parameters of the device are adjusted to evaluate the imaging effect, so that the device is in the best state to perform year identification of the sample to be tested 200, so as to improve the accuracy of the year result of the sample to be tested 200; 00, to achieve non-destructive and non-contact detection, and the detection speed is fast, the cost is low, the threshold of use is low, and the scope of application is wide. It has become a convenient and fast means of identifying the age of tangerine peel.
在此基础上,本申请实施例的另一方面,还公开了一种陈皮年份快速鉴别的方法,应用于上述的陈皮年份快速鉴别的装置中的处理器,如图2所示,该方法包括:On this basis, another aspect of the embodiment of the present application also discloses a method for quickly identifying the age of tangerine peel, which is applied to the processor in the above-mentioned device for quickly identifying the age of tangerine peel. As shown in Figure 2, the method includes:
S10:调节多光谱相机100和目标区域之间的距离,使多光谱相机100采集的画面能够覆盖目标区域以满足预设要求。S10: Adjust the distance between the multi-spectral camera 100 and the target area, so that the images collected by the multi-spectral camera 100 can cover the target area to meet preset requirements.
多光谱相机100竖直设置在待测样本200上方,调节多光谱相机100和待测样本200的距离,使待测样本200在多光谱相机100的画面能够覆盖目标区域,目标区域为载物台102上预先划定的用于放置待测样本200的区域,目标区域大于待测样本200区域,待测样本200一般放置在目标区域的中心位置。The multispectral camera 100 is vertically arranged above the sample to be tested 200, and the distance between the multispectral camera 100 and the sample to be tested 200 is adjusted so that the image of the sample to be tested 200 on the multispectral camera 100 can cover the target area. The target area is a pre-defined area on the stage 102 for placing the sample to be tested 200. The target area is larger than the area of the sample to be tested 200, and the sample to be tested 200 is generally placed in the center of the target area.
调节时,可采用手动调节,也可采用自动调节;例如,可通过自动机构驱动多光谱相机100移动,靠近或远离待测样本200,通过多光谱相机100的画面以判断是否调节到位。其中,多光谱相机100的画面可反馈给处理器,处理器通过预先设定的标准画面与多光谱相机100的画面进行比对进行自动判断。During adjustment, manual adjustment or automatic adjustment can be used; for example, the multispectral camera 100 can be driven by an automatic mechanism to move close to or away from the sample 200 to be tested, and the image of the multispectral camera 100 can be used to judge whether the adjustment is in place. Wherein, the picture of the multispectral camera 100 can be fed back to the processor, and the processor compares the preset standard picture with the picture of the multispectral camera 100 for automatic judgment.
S100:根据预设算法调节光源101与待测样本200(目标区域)之间的角度和距离,以使光源101与待测样本200满足预设距离和角度关系。S100: Adjust the angle and distance between the light source 101 and the sample to be tested 200 (target area) according to a preset algorithm, so that the light source 101 and the sample to be tested 200 meet the preset distance and angle relationship.
在调节光源101与待测样本200之间的角度和距离过程中,在目标区域内放置一个标准反射白板以替代待测样本200,通过多光谱相机100采集目标区域中标准反射白板的标准光谱图像;In the process of adjusting the angle and distance between the light source 101 and the sample to be tested 200, a standard reflective whiteboard is placed in the target area to replace the sample to be tested 200, and the standard spectral image of the standard reflective whiteboard in the target area is collected by the multispectral camera 100;
根据标准反射白板的光谱图像以及公式计算确定光源101与待测样本200之间的角度和距离是否满足预设距离和角度关系。Spectral image and formula based on standard reflective whiteboard Calculate and determine whether the angle and distance between the light source 101 and the sample 200 to be tested satisfy the preset distance and angle relationship.
其中,表示第i个波长下图像的灰度值方差,为第i个波长下图像的灰度值均值,W、H分别为目标区域宽和高的像素数量,fi(x,y)表示第i个波长下图像在坐标(x,y)处的灰度值。in, Indicates the variance of the gray value of the image at the i-th wavelength, is the average gray value of the image at the i-th wavelength, W and H are the number of pixels in the width and height of the target area respectively, f i (x, y) represents the gray value of the image at the coordinate (x, y) at the i-th wavelength.
在本申请的一个可实现的方式中,距离的调节范围为30cm~60cm,步长(一次调节的最小单位)为5cm;角度(光源101和水平方向的夹角)的调节范围为70°~85°,步长为3°。In a practicable manner of the present application, the adjustment range of the distance is 30 cm to 60 cm, and the step length (the minimum unit of one adjustment) is 5 cm; the adjustment range of the angle (the angle between the light source 101 and the horizontal direction) is 70° to 85°, and the step length is 3°.
调节的目的是使成像画面中目标区域均匀照明,光照均匀性的评估方法是:在载物台102上放置一块尺寸能够覆盖目标区域的标准反射白板,每进行一次调节后,使用多光谱相机100拍摄标准反射白板的光谱图像,通过公式计算得到光照均匀性指标I,该光照均匀性指标I表示各波长下的图像在目标区域的灰度值的方差的平均值,其光照均匀性指标I的数值越小表示光照均匀性越好。The purpose of the adjustment is to uniformly illuminate the target area in the imaging picture. The evaluation method for the uniformity of illumination is: place a standard reflective whiteboard with a size that can cover the target area on the stage 102, and after each adjustment, use the multispectral camera 100 to take a spectral image of the standard reflective whiteboard, and use the formula The illumination uniformity index I is calculated, and the illumination uniformity index I represents the average value of the variance of the gray value of the image at each wavelength in the target area, and the smaller the value of the illumination uniformity index I, the better the illumination uniformity.
调节光源101与待测样本200之间的角度和距离之后,调节多光谱相机100的曝光参数,使成像画面的目标区域中有不超过5%的像素点的灰度值达到最大值或最小值。After adjusting the angle and distance between the light source 101 and the sample 200 to be tested, adjust the exposure parameters of the multispectral camera 100 so that the grayscale values of no more than 5% of the pixels in the target area of the imaging image reach the maximum or minimum value.
具体地,调节光源101的光强随波长分布,使目标区域在多光谱相机100所拍摄的各个波长下均得到充分照明;调节多光谱相机100的曝光参数,使成像画面不过曝或者欠曝;过曝或欠曝分别指成像画面的目标区域中有超过5%的像素点的灰度值达到最大值(255)或最小值(0)。Specifically, adjust the distribution of the light intensity of the light source 101 along with the wavelength, so that the target area is fully illuminated at each wavelength captured by the multispectral camera 100; adjust the exposure parameters of the multispectral camera 100, so that the imaging picture is overexposed or underexposed; overexposure or underexposure respectively means that the gray value of more than 5% of the pixels in the target area of the imaging picture reaches the maximum value (255) or the minimum value (0).
通过上述步骤,将系统的各参数调节至最佳状态,然后将待测样本200放置在目标区域进行鉴别,以能获取待测样本200的最佳成像数据,进而鉴别得到的待测样本200的年份结果更准确。Through the above steps, the parameters of the system are adjusted to the best state, and then the sample 200 to be tested is placed in the target area for identification, so as to obtain the best imaging data of the sample 200 to be tested, and then the result of identification of the year of the sample 200 to be tested is more accurate.
S110:光源101与待测样本200满足预设距离和角度关系后,使光源101中的多颗LED灯珠分别朝向位于目标区域的待测样本200出射光束。S110: After the light source 101 and the sample to be tested 200 meet the preset distance and angle relationship, make the plurality of LED lamp beads in the light source 101 respectively emit light beams toward the sample to be tested 200 located in the target area.
步骤S100已经调节好光源101与待测样本200满足预设距离和角度关系,此时将待测样本200放置在目标区域内以替换标准反射白板,光源101则朝向待测样本200出射光束,此时待测样本200能够被充分照明,待测样本200接收的光束的照明均匀性最好。Step S100 has adjusted the light source 101 and the sample to be tested 200 to meet the preset distance and angle relationship. At this time, the sample to be tested 200 is placed in the target area to replace the standard reflective white board, and the light source 101 emits a light beam toward the sample to be tested 200. At this time, the sample to be tested 200 can be fully illuminated, and the illumination uniformity of the light beam received by the sample to be tested 200 is the best.
S120:通过多光谱相机100分别接收多颗LED灯珠的光束照射待测样本200后反射的光束,以得到待测样本200在不同波长光照下的原始光谱图像数据,其中,多光谱相机100与待测样本200的距离满足预设要求。S120: The multi-spectral camera 100 respectively receives the light beams reflected by the light beams of multiple LED beads irradiating the sample 200 to be tested, so as to obtain the original spectral image data of the sample 200 to be tested under different wavelengths of light, wherein the distance between the multi-spectral camera 100 and the sample 200 to be tested meets the preset requirements.
光源101照射待测样本200后,待测样本200反射光束至多光谱相机100,处理器接收多光谱相机100反馈的待测样本200在多个不同波段的光束,以获取待测样本200在多个不同波段的原始光谱图像数据。After the light source 101 irradiates the test sample 200, the test sample 200 reflects the light beam to the multispectral camera 100, and the processor receives the light beams of the test sample 200 in multiple different bands fed back by the multispectral camera 100, so as to obtain the original spectral image data of the test sample 200 in multiple different bands.
示例地,将待测样本200放置在载物台102上的目标区域中,通过多光谱相机100采集待测样本200在十个不同波段的原始光谱图像数据,其中十个波段的中心波长为:720nm、743nm、766nm、789nm、812nm、835nm、858nm、881nm、904nm和927nm;原始光谱图像数据为光谱图像,光谱图像的图像分辨率为1280*1024像素,换言之,可得到十张待测样本200的光谱图像;此外,波段的数量根据多光谱相机100本身的性能决定。For example, the sample 200 to be tested is placed in the target area on the stage 102, and the original spectral image data of the sample 200 to be tested in ten different bands are collected by the multispectral camera 100, wherein the central wavelengths of the ten bands are: 720nm, 743nm, 766nm, 789nm, 812nm, 835nm, 858nm, 881nm, 904nm and 927nm; The image resolution is 1280*1024 pixels, in other words, ten spectral images of the sample 200 to be tested can be obtained; in addition, the number of bands is determined according to the performance of the multispectral camera 100 itself.
S130A:对原始光谱图像数据进行配准校正,得到校正数据。配准校正包括不同波段的图像配准和反射率校正。由于该多光谱相机100在成像时,各波段依次扫描成像,当多光谱相机100在拍摄过程中存在抖动时,不同波段的图像会出现位置偏差,因此需要通过图像配准的方式修正这种偏差。S130A: Perform registration correction on the original spectral image data to obtain correction data. Registration correction includes image registration of different bands and reflectance correction. Since the multispectral camera 100 scans each band sequentially during imaging, when the multispectral camera 100 shakes during the shooting process, the images of different bands will have position deviations, so this deviation needs to be corrected by means of image registration.
图像配准的具体方法是:通过处理器内的ORB特征检测模块分别提取多个不同波段的原始光谱图像数据的关键点特征;关键点特征为待测样本200的光谱图像的边缘角点特征;The specific method of image registration is: through the ORB feature detection module in the processor, the key point features of the original spectral image data of a plurality of different bands are respectively extracted; the key point features are the edge corner features of the spectral image of the sample 200 to be tested;
采用蛮力匹配模块对关键点特征进行匹配,使多个不同波段的原始光谱图像数据的关键点特征重合;如上述采集十个波段的光谱图像,将这十个光谱图像叠加重合,拉动十个光谱图像上待测样本200的边缘角点,使十个光谱图像上待测样本200的边缘角点分别对齐。Use the brute force matching module to match the key point features, so that the key point features of the original spectral image data of multiple different bands overlap; collect the spectral images of ten bands as described above, superimpose and overlap the ten spectral images, pull the edge corner points of the sample to be tested 200 on the ten spectral images, and align the edge corner points of the sample to be tested 200 on the ten spectral images respectively.
根据匹配的关键点特征对原始光谱图像数据进行转换,实现多个不同波段的原始光谱图像数据的像素级对齐,得到多个配准转换后的光谱图像。The original spectral image data is converted according to the matched key point features, and the pixel-level alignment of the original spectral image data of multiple different bands is realized, and multiple registered and transformed spectral images are obtained.
再进行反射率校正,进行反射率校正的目的是消除环境光照和相机暗电流对多光谱成像的影响。进行反射率校正的具体方法是:目标区域放置一块反射率已知的标准反射白板以替换待测样本200;Then reflectance correction is performed, and the purpose of reflectance correction is to eliminate the influence of ambient light and camera dark current on multispectral imaging. The specific method for correcting the reflectance is: place a standard reflective whiteboard with known reflectance in the target area to replace the sample 200 to be tested;
在和拍摄待测样本200相同的拍摄条件下,采用镜头盖遮住多光谱相机100的镜头,通过多光谱相机100拍摄以获取多光谱相机100的暗电流数据;Under the same shooting conditions as shooting the sample to be tested 200, a lens cover is used to cover the lens of the multispectral camera 100, and the dark current data of the multispectral camera 100 is obtained by shooting with the multispectral camera 100;
去除镜头盖后,通过多光谱相机100拍摄标准反射白板,获取多光谱相机100反馈的标准反射白板的标准光谱图像;After removing the lens cover, the standard reflective whiteboard is photographed by the multispectral camera 100, and the standard spectral image of the standard reflective whiteboard fed back by the multispectral camera 100 is obtained;
根据标准反射白板的标准光谱图像,通过公式I1=(I0-B)/((W-B)/r)计算得到反射率校正后的光谱图像;其中,I1是校正后的光谱图像数据,I0是配准转换后的光谱图像数据,B是暗电流数据,W是标准反射白板数据,r是标准反射白板的反射率。According to the standard spectral image of the standard reflective whiteboard, the reflectance-corrected spectral image is calculated by the formula I 1 = (I 0 -B)/((WB)/r); wherein, I 1 is the corrected spectral image data, I 0 is the spectral image data after registration conversion, B is the dark current data, W is the standard reflective whiteboard data, and r is the reflectance of the standard reflective whiteboard.
S130:根据光谱图像数据进行感兴趣区域提取操作,得到感兴趣区域数据。S130: Perform a region-of-interest extraction operation according to the spectral image data to obtain region-of-interest data.
感兴趣区域提取,即筛选出多光谱图像中的特定区域进行分析,消除背景对分析结果的影响。感兴趣区域提取确切地说,是对校正后的光谱图像进行操作,感兴趣区域提取的具体方法是:Region of interest extraction, that is, to filter out a specific region in the multispectral image for analysis, and eliminate the influence of the background on the analysis results. To be precise, the region of interest extraction is to operate on the corrected spectral image. The specific method of region of interest extraction is:
随机复制任一个波段下的反射率校正后的光谱图像用于制作蒙版,并采用中值滤波方法对蒙版图像进行降噪;Randomly copy the reflectance-corrected spectral image under any band to make a mask, and use the median filter method to denoise the mask image;
通过自适应阈值分割的方法将蒙版图像二值化,以划分出背景区域和待测样本200图像区域;Binarize the mask image by means of adaptive threshold segmentation to divide the background area and the 200 image area of the sample to be tested;
对二值化的蒙版图像依次进行开运算和闭运算的形态学处理,消除背景区域中的白点和待测样本200图像区域中的黑点;Carry out the morphological processing of the opening operation and the closing operation on the binarized mask image in turn, and eliminate the white spots in the background area and the black spots in the image area of the sample 200 to be tested;
从蒙版图像提取得到待测样本200图像区域的外包框,选取特定形状的框形作为外包框,以将待测样本200图像区域通过外包框框起来,例如外包框可为矩形框;Extract the outer frame of the image area of the sample to be tested 200 from the mask image, select a frame of a specific shape as the outer frame, and frame the image area of the sample 200 to be tested by the outer frame, for example, the outer frame can be a rectangular frame;
选取外包框中心40%~50%的区域作为待测样本200图像区域的感兴趣区域;选取外包框中心区域作为感兴趣区域,一般以中心区域40%~50%为选取标准;Select the area of 40% to 50% of the center of the outer frame as the region of interest in the image area of the sample 200 to be tested; select the center area of the outer frame as the region of interest, and generally take 40% to 50% of the central area as the selection standard;
上述步骤均是对蒙版图像的处理,得到蒙版图像的坐标,然后基于蒙版图像的坐标,对反射率校正后的多个光谱图像数据进行裁切,提取出感兴趣区域数据。本步骤中,可将前述十个反射率校正后的多个光谱图像代入蒙版图像,然后一一进行裁切,得到十个感兴趣区域数据。The above steps are all processing the mask image to obtain the coordinates of the mask image, and then based on the coordinates of the mask image, the reflectance-corrected multiple spectral image data are cut to extract the data of the region of interest. In this step, the aforementioned ten reflectance-corrected spectral images can be substituted into the mask image, and then cut out one by one to obtain ten regions of interest data.
S140:根据感兴趣区域数据输入陈皮年份鉴定模型,得到待测样本200的年份。S140: Input the tangerine peel age identification model according to the data of the region of interest to obtain the age of the sample 200 to be tested.
如图3所示,陈皮年份鉴定模型为双分支结构,包括图像分支和光谱分支。其中,图像分支结构包括:As shown in Figure 3, the age identification model of tangerine peel has a double-branch structure, including image branch and spectral branch. Among them, the image branch structure includes:
采用1*1卷积层对输入的光谱图像通道数进行降维;上述采集的十个波段、得到的十个感兴趣区域数据可看成十个光谱图像通道,可将十个光谱图像降维成三个特征图。The 1*1 convolutional layer is used to reduce the number of input spectral image channels; the ten bands collected above and the data of the ten regions of interest obtained can be regarded as ten spectral image channels, and the ten spectral images can be reduced into three feature maps.
通过图像特征提取网络模块提取图像特征,图像特征为图像一维向量;将三个特征图提取图像特征后得到一组图像一维向量。Image features are extracted through the image feature extraction network module, and the image features are image one-dimensional vectors; a set of image one-dimensional vectors is obtained after the image features are extracted from the three feature maps.
光谱分支结构包括:采用核大小为9*9的平均池化层对输入光谱图像的像素数进行降维;The spectral branch structure includes: using an average pooling layer with a kernel size of 9*9 to reduce the number of pixels of the input spectral image;
通过1*1卷积调整图像通道数,一般可将十个通道调整至六十四个通道,进行不同波长所代表的图像通道间的特征提取和特征组合,以得到六十四张三维特征图像;Adjust the number of image channels through 1*1 convolution. Generally, ten channels can be adjusted to sixty-four channels, and feature extraction and feature combination between image channels represented by different wavelengths are performed to obtain sixty-four three-dimensional feature images;
将输出的三维特征图像按像素点按顺序依次取出后,重新排列成二维的特征向量组;例如可排列成一组横排或竖列的特征向量组;After the output three-dimensional feature image is taken out in order according to the pixel points, it is rearranged into a two-dimensional feature vector group; for example, it can be arranged into a set of horizontal or vertical feature vector groups;
将二维的特征向量组输入到光谱特征提取网络模块提取光谱特征,光谱特征为光谱一维向量;其中,图像特征提取网络模块和光谱特征提取网络模块为结构相似的轻量级卷积神经网络,其特征均是采用深度可分离卷积和ECA注意力机制模块;区别是图像特征提取网络模块为二维卷积神经网络,光谱特征提取网络模块为一维卷积神经网络。The two-dimensional feature vector group is input to the spectral feature extraction network module to extract spectral features, and the spectral feature is a spectral one-dimensional vector; among them, the image feature extraction network module and the spectral feature extraction network module are lightweight convolutional neural networks with similar structures, and their features are both depth separable convolution and ECA attention mechanism modules; the difference is that the image feature extraction network module is a two-dimensional convolutional neural network, and the spectral feature extraction network module is a one-dimensional convolutional neural network.
将图像一维向量和光谱一维向量拼接;Concatenate the image one-dimensional vector and the spectrum one-dimensional vector;
经过全连接层和Softmax激活函数得到待测样本200的年份概率分布,概率分布较大的年份可作为最终待测样本200的年份鉴别结果。The year probability distribution of the sample 200 to be tested is obtained through the fully connected layer and the Softmax activation function, and the year with a larger probability distribution can be used as the final identification result of the year of the sample 200 to be tested.
该陈皮年份快速鉴别的方法包含与前述实施例中的陈皮年份快速鉴别的装置相同的结构和有益效果。陈皮年份快速鉴别的装置的结构和有益效果已经在前述实施例中进行了详细描述,在此不再赘述。The method for quickly identifying the age of tangerine peel contains the same structure and beneficial effects as the device for quickly identifying the age of tangerine peel in the foregoing embodiments. The structure and beneficial effects of the device for quickly identifying the age of orange peel have been described in detail in the foregoing embodiments, and will not be repeated here.
以上仅为本申请的实施例而已,并不用于限制本申请的保护范围,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only examples of the present application, and are not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310558741.0A CN116465840A (en) | 2023-05-17 | 2023-05-17 | A device and method for quickly identifying the age of tangerine peel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310558741.0A CN116465840A (en) | 2023-05-17 | 2023-05-17 | A device and method for quickly identifying the age of tangerine peel |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116465840A true CN116465840A (en) | 2023-07-21 |
Family
ID=87175528
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310558741.0A Pending CN116465840A (en) | 2023-05-17 | 2023-05-17 | A device and method for quickly identifying the age of tangerine peel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116465840A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118837302A (en) * | 2024-06-28 | 2024-10-25 | 湖南烟叶复烤有限公司 | Specific multispectral information acquisition system for detecting tobacco flakes and sundries and manufacturing method |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110002536A1 (en) * | 2009-07-01 | 2011-01-06 | The Texas A&M University System | Multispectral natural fiber quality sensor for real-time in-situ measurement |
CN109767425A (en) * | 2018-12-13 | 2019-05-17 | 合刃科技(武汉)有限公司 | Machine vision light source uniformity assesses device and method |
CN111044261A (en) * | 2019-12-27 | 2020-04-21 | 深圳盛达同泽科技有限公司 | Method, device, storage medium and system for detecting illumination uniformity of eye fundus camera |
US20200141877A1 (en) * | 2018-11-06 | 2020-05-07 | Nanjing Agricultural University | Method for estimating aboveground biomass of rice based on multi-spectral images of unmanned aerial vehicle |
CN113177935A (en) * | 2021-05-21 | 2021-07-27 | 陕西利丰恒信生物科技发展有限公司 | Near-infrared light intensity uniformity detection method and device and computer equipment |
US20210334569A1 (en) * | 2020-04-28 | 2021-10-28 | NextVPU (Shanghai) Co., Ltd. | Image depth determining method and living body identification method, circuit, device, and medium |
CN114299030A (en) * | 2021-12-29 | 2022-04-08 | 中国建设银行股份有限公司 | Object detection model processing method, device, equipment and storage medium |
CN114418927A (en) * | 2021-11-09 | 2022-04-29 | 四川大学 | A closed-loop detection method and system based on spatial relationship feature matching |
CN115082653A (en) * | 2022-06-22 | 2022-09-20 | 中国科学院空天信息创新研究院 | A non-destructive identification method of ginseng based on angular hyperspectral information |
CN115372274A (en) * | 2022-07-29 | 2022-11-22 | 合肥工业大学 | A method and device for non-destructive evaluation of pork quality grades based on multispectral imaging |
WO2023273411A1 (en) * | 2021-07-01 | 2023-01-05 | 奥比中光科技集团股份有限公司 | Multispectral data acquisition method, apparatus and device |
CN115909324A (en) * | 2022-11-01 | 2023-04-04 | 华南农业大学 | A hyperspectral identification method and system for the aging year of tangerine peel |
-
2023
- 2023-05-17 CN CN202310558741.0A patent/CN116465840A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110002536A1 (en) * | 2009-07-01 | 2011-01-06 | The Texas A&M University System | Multispectral natural fiber quality sensor for real-time in-situ measurement |
US20200141877A1 (en) * | 2018-11-06 | 2020-05-07 | Nanjing Agricultural University | Method for estimating aboveground biomass of rice based on multi-spectral images of unmanned aerial vehicle |
CN109767425A (en) * | 2018-12-13 | 2019-05-17 | 合刃科技(武汉)有限公司 | Machine vision light source uniformity assesses device and method |
CN111044261A (en) * | 2019-12-27 | 2020-04-21 | 深圳盛达同泽科技有限公司 | Method, device, storage medium and system for detecting illumination uniformity of eye fundus camera |
US20210334569A1 (en) * | 2020-04-28 | 2021-10-28 | NextVPU (Shanghai) Co., Ltd. | Image depth determining method and living body identification method, circuit, device, and medium |
CN113177935A (en) * | 2021-05-21 | 2021-07-27 | 陕西利丰恒信生物科技发展有限公司 | Near-infrared light intensity uniformity detection method and device and computer equipment |
WO2023273411A1 (en) * | 2021-07-01 | 2023-01-05 | 奥比中光科技集团股份有限公司 | Multispectral data acquisition method, apparatus and device |
CN114418927A (en) * | 2021-11-09 | 2022-04-29 | 四川大学 | A closed-loop detection method and system based on spatial relationship feature matching |
CN114299030A (en) * | 2021-12-29 | 2022-04-08 | 中国建设银行股份有限公司 | Object detection model processing method, device, equipment and storage medium |
CN115082653A (en) * | 2022-06-22 | 2022-09-20 | 中国科学院空天信息创新研究院 | A non-destructive identification method of ginseng based on angular hyperspectral information |
CN115372274A (en) * | 2022-07-29 | 2022-11-22 | 合肥工业大学 | A method and device for non-destructive evaluation of pork quality grades based on multispectral imaging |
CN115909324A (en) * | 2022-11-01 | 2023-04-04 | 华南农业大学 | A hyperspectral identification method and system for the aging year of tangerine peel |
Non-Patent Citations (1)
Title |
---|
张立福 等著: "《高光谱遥感信息处理》", 30 June 2021, 湖北科学技术出版社, pages: 77 - 78 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118837302A (en) * | 2024-06-28 | 2024-10-25 | 湖南烟叶复烤有限公司 | Specific multispectral information acquisition system for detecting tobacco flakes and sundries and manufacturing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4154374B2 (en) | Pattern matching device and scanning electron microscope using the same | |
CN112308832B (en) | Bearing quality detection method based on machine vision | |
US9697618B2 (en) | Image processing apparatus, image processing method, program, and image processing system | |
EP3239925A1 (en) | Fish type determination device and fish type determination method | |
JPWO2019151393A1 (en) | Food inspection system, food inspection program, food inspection method and food production method | |
CN108490000A (en) | A kind of Bar Wire Product surface defect on-line measuring device and method | |
JP5342413B2 (en) | Image processing method | |
US20200141804A1 (en) | Method and system for hyperspectral light field imaging | |
CN115205194B (en) | Image processing-based method, system and device for detecting coverage rate of armyworm plate | |
TWI512284B (en) | Bubble inspection system for glass | |
CN115100104A (en) | Defect detection method, device and equipment for glass ink area and readable storage medium | |
CN116465840A (en) | A device and method for quickly identifying the age of tangerine peel | |
JP4801697B2 (en) | Image forming method, image forming apparatus, and computer program | |
CN114972547A (en) | Method for determining tooth color | |
KR102727706B1 (en) | Method for extracting spectral information of a target substance | |
KR101906139B1 (en) | Machine vision system of automatic light setting using inspection standard image | |
CN111161852B (en) | Endoscope image processing method, electronic equipment and endoscope system | |
CN107529962B (en) | Image processing apparatus, image processing method, and recording medium | |
TWI510776B (en) | Bubble inspection processing method for glass | |
JP5860970B2 (en) | Post-processing to improve eigenimage generation | |
KR102082102B1 (en) | Soil classification estimation method and soil moisture percentage estimation method using soil image | |
CN116645351A (en) | A method and system for online defect detection in complex scenes | |
CN118679502A (en) | Method, apparatus and system for analyzing a sample | |
JP5391172B2 (en) | Foreign object inspection apparatus and alignment adjustment method | |
CN114152621A (en) | Processing method, processing device and processing system |
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 |