CN102193819B - Single-point noise resistant method and device for positioning light spot center - Google Patents
Single-point noise resistant method and device for positioning light spot center Download PDFInfo
- Publication number
- CN102193819B CN102193819B CN 201010244422 CN201010244422A CN102193819B CN 102193819 B CN102193819 B CN 102193819B CN 201010244422 CN201010244422 CN 201010244422 CN 201010244422 A CN201010244422 A CN 201010244422A CN 102193819 B CN102193819 B CN 102193819B
- Authority
- CN
- China
- Prior art keywords
- pixel
- spot
- value
- noise
- centroid
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
本发明公开了一种抗单点噪声的光斑中心定位方法,包括:依次将光斑图像每个像素的灰度值与预设阈值进行比较,确定小于阈值的像素标记为背景像素,确定大于阈值的像素,判断其相邻像素是否为背景像素,如果是,则将当前像素标记为噪声像素,否则,根据当前像素相邻像素的标记来标记当前光斑像素;根据相邻像素标记,对光斑像素进行质心参数组值累加和存储,对真正噪声像素不进行质心参数组值累加和存储;确定每个像素均标记结束时,根据各光斑最终质心参数组累加值计算各光斑的质心行列坐标。本发明还公开了一种抗单点噪声的光斑中心定位装置,运用该方法和装置可在提取光斑中心的同时去除噪声点,节省数据存储空间,同时实现光斑中心实时提取。
The invention discloses a method for locating the spot center against single-point noise, which includes: sequentially comparing the gray value of each pixel of the spot image with a preset threshold, determining that pixels smaller than the threshold are marked as background pixels, and determining pixels larger than the threshold pixel, judge whether its adjacent pixel is a background pixel, if so, mark the current pixel as a noise pixel, otherwise, mark the current spot pixel according to the mark of the adjacent pixel of the current pixel; according to the mark of the adjacent pixel, perform Accumulate and store the centroid parameter group value, and do not accumulate and store the centroid parameter group value for the real noise pixels; when it is determined that each pixel is marked, the centroid row and column coordinates of each spot are calculated according to the final centroid parameter group accumulated value of each spot. The invention also discloses a single-point noise-resistant light spot center positioning device. The method and device can remove noise points while extracting the light spot center, save data storage space, and realize real-time extraction of the light spot center.
Description
技术领域 technical field
本发明涉及图像处理技术,尤其涉及一种抗单点噪声的光斑中心定位方法及装置。The invention relates to image processing technology, in particular to a spot center positioning method and device against single point noise.
背景技术 Background technique
光斑图像是现有图像处理中常见的图像信息,光斑中心是光斑图像的重要特征。光斑中心被广泛应用于机器视觉中的目标跟踪、模式识别中的特征点提取、激光测量及通信中激光光斑中心的定位以及航空航天应用中姿态测量部件星敏感器的星点定位和太阳敏感器的太阳光斑定位等。The spot image is common image information in existing image processing, and the center of the spot is an important feature of the spot image. Spot center is widely used in target tracking in machine vision, feature point extraction in pattern recognition, positioning of laser spot center in laser measurement and communication, and star point positioning of star sensors and sun sensors in attitude measurement components in aerospace applications Sun spot positioning, etc.
在实际应用中,拍摄所得的光斑图像中经常含有噪声点,这些噪声点主要源于图像传感器的模式噪声,通常表现为离散的单像素点,且噪声的灰度值较大,无法通过阈值去掉。图像传感器的曝光时间越长,所述越明显,所以,在曝光时间较短的应用中,如:使用太阳敏感器时,光斑图像中的噪声点不明显;但是,在星敏感器的应用过程中,为了提高其灵敏度,图像传感器需要较长的曝光时间,因此光斑图像中的噪声点将会比较明显,这种情况下就要求星敏感器在执行定位操作时需具有一定的抗噪声能力。In practical applications, the captured spot images often contain noise points. These noise points are mainly caused by the pattern noise of the image sensor, usually appearing as discrete single-pixel points, and the gray value of the noise is large, which cannot be removed by thresholding. . The longer the exposure time of the image sensor, the more obvious it is. Therefore, in applications with a shorter exposure time, such as: when using a sun sensor, the noise points in the spot image are not obvious; however, in the application process of the star sensor In order to improve its sensitivity, the image sensor needs a longer exposure time, so the noise points in the spot image will be more obvious. In this case, the star sensor is required to have a certain anti-noise ability when performing positioning operations.
现有技术中,无法直接对含有噪声点的光斑图像进行光斑中心定位,一种方法为:先通过滤波方式对图像进行预处理除掉噪声点,然后再对图像光斑进行中心定位,这样,无疑要增加较大的数据存储空间以保存预处理的图像;而且,由于事先要对光斑图像进行预处理,所以无法实现光斑中心的实时提取,从而影响光斑图像的处理速度;此外,由于需对光斑图像进行预处理,预处理操作通常需在PC机或ARM处理器中实现,无法满足器件的集成化和小型化要求。In the prior art, it is impossible to directly locate the spot center of the spot image containing noise points. One method is: first preprocess the image by filtering to remove the noise points, and then perform center positioning on the image spot. In this way, there is no doubt that It is necessary to increase the large data storage space to save the preprocessed image; moreover, because the spot image needs to be preprocessed in advance, the real-time extraction of the center of the spot cannot be realized, thereby affecting the processing speed of the spot image; The image is pre-processed, and the pre-processing operation usually needs to be implemented in a PC or an ARM processor, which cannot meet the requirements of device integration and miniaturization.
另一种光斑中心定位方法为:先将噪声点当作单像素光斑处理,然后根据光斑的总像素个数去除这种噪声点,该方法的具体实现过程可参见专利号为ZL200610161802.6和专利号为03105743.6的两项专利由于该方法首先将噪声当作光斑来处理,所以需要预留最大光斑所需要的存储空间,:图像中真实光斑为6个,噪声点为5个,且最大光斑需要的参数存储空间为12字节,那么,在处理该幅图像时所需的存储空间则为(6+5)×12=132字节,所以这种方法处理单点噪声较多的图像将需要很大的存储空间。Another spot center positioning method is: first treat the noise point as a single pixel spot, and then remove the noise point according to the total number of pixels of the spot. The specific implementation process of this method can be found in the patent No. ZL200610161802.6 and patent The two patents No. 03105743.6 treat the noise as light spots first, so it is necessary to reserve the storage space required for the maximum light spot: there are 6 real light spots in the image, and 5 noise points, and the maximum light spot requires The parameter storage space is 12 bytes, then, the required storage space when processing this image is then (6+5)×12=132 bytes, so this method will require more images with single-point noise Great storage space.
发明内容 Contents of the invention
有鉴于此,本发明的主要目的在于提供一种抗单点噪声的光斑中心定位方法及装置,其在提取光斑中心的同时去除光斑图像中的噪声点,节省数据存储空间,同时实现光斑中心的实时提取。In view of this, the main purpose of the present invention is to provide a method and device for locating the spot center against single-point noise, which removes noise points in the spot image while extracting the center of the spot, saves data storage space, and realizes the location of the center of the spot at the same time. Extraction in real time.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:
本发明提供了一种抗单点噪声的光斑中心定位方法,该方法包括:The invention provides a method for locating the spot center against single point noise, the method comprising:
依次将光斑图像的每个像素的灰度值与预设的阈值进行比较,将灰度值小于阈值的像素标记为背景像素,对于灰度值大于阈值的像素,判断其相邻像素是否为背景像素,如果是,则将当前像素标记为噪声像素;如果不是,则确定当前像素为光斑像素,根据当前像素的相邻像素的标记来标记当前光斑像素;Compare the gray value of each pixel of the spot image with the preset threshold in turn, mark the pixels whose gray value is less than the threshold as background pixels, and judge whether the adjacent pixels are background pixels for the pixels whose gray value is greater than the threshold Pixel, if yes, then mark the current pixel as a noise pixel; if not, then determine that the current pixel is a spot pixel, and mark the current spot pixel according to the marks of the adjacent pixels of the current pixel;
根据相邻像素的标记,对光斑像素进行质心参数组值累加和存储,不对真正噪声像素进行质心参数组值累加和存储;确定光斑图像的每个像素均已标记结束后,根据各光斑的最终质心参数组累加值,按照一阶矩质心计算公式计算各光斑的质心行列坐标。According to the marking of adjacent pixels, the centroid parameter group values are accumulated and stored for the spot pixels, and the centroid parameter group values are not accumulated and stored for the real noise pixels; after each pixel of the spot image has been marked, according to the final The accumulated value of the centroid parameter group is used to calculate the row and column coordinates of the centroid of each spot according to the first-order moment centroid calculation formula.
其中,所述当前像素的相邻像素包括:左方像素、上方像素和右上方像素。Wherein, the adjacent pixels of the current pixel include: a left pixel, an upper pixel, and an upper right pixel.
所述根据当前像素的相邻像素的标记来标记当前像素,具体为:The marking of the current pixel according to the marking of the adjacent pixels of the current pixel is specifically:
判断当前像素的左方像素是否为噪声像素或背景像素,如果不是,则将当前像素标记为左方像素的标记值;否则,Determine whether the pixel to the left of the current pixel is a noise pixel or a background pixel, if not, mark the current pixel as the value of the left pixel; otherwise,
判断当前像素的上方像素是否为噪声像素或背景像素,如果不是,则将当前像素标记为上方像素的标记值;否则,Determine whether the upper pixel of the current pixel is a noise pixel or a background pixel, if not, mark the current pixel as the marked value of the upper pixel; otherwise,
判断当前像素的上方像素是否为噪声像素,同时判断当前像素的右上方像素是否不为噪声像素或背景像素,如果是,则将当前像素标记为右上方像素的标记值;否则,将当前像素标记为光斑新标记值。Determine whether the upper pixel of the current pixel is a noise pixel, and at the same time determine whether the upper right pixel of the current pixel is not a noise pixel or a background pixel, if so, mark the current pixel as the marked value of the upper right pixel; otherwise, mark the current pixel New tag value for the spot.
所述根据相邻像素的标记,对光斑像素进行质心参数组值进行累加存储,具体包括:According to the marks of adjacent pixels, the centroid parameter group values of the spot pixels are accumulated and stored, specifically including:
当判断当前像素灰度小于阈值且左方像素不是背景像素或噪声像素时,说明光斑一行有效像素结束,则将左方像素对应标记的质心参数组值进行累加存储;When it is judged that the grayscale of the current pixel is less than the threshold and the left pixel is not a background pixel or a noise pixel, it means that a row of effective pixels of the light spot is over, and the centroid parameter group value corresponding to the mark of the left pixel is accumulated and stored;
如果当前像素的灰度值大于阈值,且当前像素的左方像素和上方像素为两个标记值不同的有效光斑像素时,则将左方像素标记对应的质心参数组值与上方像素标记对应的质心参数组值进行累加,并将左方像素所属光斑标记更新为上方像素所属光斑标记。If the grayscale value of the current pixel is greater than the threshold, and the left pixel and the upper pixel of the current pixel are two effective spot pixels with different tag values, then the centroid parameter group value corresponding to the left pixel tag and the upper pixel tag corresponding The centroid parameter group values are accumulated, and the spot mark of the left pixel is updated to the spot mark of the upper pixel.
所述根据相邻像素的标记,不对真正噪声像素进行质心参数组值累加和存储,具体为:According to the marking of adjacent pixels, the centroid parameter group value is not accumulated and stored for the real noise pixel, specifically:
当前像素的灰度值小于阈值,且当前像素的左方像素为噪声像素,则左方像素为真正噪声像素,不进行质心参数组数值的累加存储。The gray value of the current pixel is less than the threshold value, and the left pixel of the current pixel is a noise pixel, then the left pixel is a real noise pixel, and the value of the centroid parameter set is not accumulated and stored.
本发明还提供了一种抗单点噪声的光斑中心定位装置,该装置包括:光斑像素识别模块、质心参数组累加模块和质心坐标计算模块;其中,The present invention also provides a light spot center positioning device that is resistant to single-point noise, and the device includes: a light spot pixel identification module, a centroid parameter group accumulation module, and a centroid coordinate calculation module; wherein,
所述光斑像素识别模块,用于被质心参数组累加模块触发时,依次将外部输入的光斑图像的每个像素的灰度值与预设的阈值进行比较,确定小于阈值时,将所述像素标记为背景像素;确定大于阈值时,判断所述像素的相邻像素是否为背景像素,如果是,则将所述像素标记为噪声像素;如果不是,则确定所述像素为光斑像素,根据所述像素相邻像素的标记来标记该像素;The spot pixel identification module is configured to sequentially compare the gray value of each pixel of the externally input spot image with a preset threshold when triggered by the centroid parameter group accumulation module, and when it is determined to be less than the threshold, the pixel Mark it as a background pixel; when it is determined that it is greater than the threshold, judge whether the adjacent pixel of the pixel is a background pixel, if yes, then mark the pixel as a noise pixel; if not, then determine that the pixel is a spot pixel, according to the mark the pixel by marking the pixels adjacent to the pixel;
所述质心参数组累加模块,用于根据光斑像素识别模块已标记的光斑像素的相邻像素的标记,对所述光斑像素进行质心参数组值累加和存储,且不对真正噪声像素进行质心参数组值的累加和存储,并判断光斑图像的每个像素是否均已标记结束,确定结束时,触发质心坐标计算模块;所述质心坐标计算模块,用于被质心参数组累加模块触发时,根据质心参数组累加模块所得的各光斑的最终质心参数组累加值,按照一阶矩质心计算公式计算各光斑的质心行列坐标。The centroid parameter group accumulation module is used for accumulating and storing the centroid parameter group value of the spot pixel according to the marking of adjacent pixels of the spot pixel marked by the spot pixel identification module, and not performing the centroid parameter set for the real noise pixel Accumulation and storage of values, and judging whether each pixel of the spot image has been marked to end, and when the end is determined, the centroid coordinate calculation module is triggered; when the centroid coordinate calculation module is triggered by the centroid parameter group accumulation module, according to the centroid The final centroid parameter group accumulation value of each spot obtained by the parameter group accumulation module is calculated according to the first-order moment centroid calculation formula to calculate the centroid row and column coordinates of each spot.
其中,所述光斑像素识别模块进一步包括:阈值判断处理模块和相邻像素判断标记模块;其中,Wherein, the spot pixel identification module further includes: a threshold judgment processing module and an adjacent pixel judgment marking module; wherein,
所述阈值判断处理模块,用于被质心参数组累加模块触发时,依次将外部输入的光斑图像的每个像素的灰度值与预设的阈值进行比较,确定小于或大于阈值时,触发相邻像素判断标记模块;The threshold judgment processing module is configured to sequentially compare the gray value of each pixel of the externally input spot image with a preset threshold when triggered by the centroid parameter group accumulation module, and when it is determined to be less than or greater than the threshold, trigger the corresponding Adjacent pixel judgment marking module;
所述相邻像素判断标记模块,用于被阈值判断处理模块触发后,将小于阈值的像素标记为背景像素,或判断大于阈值的像素的相邻像素是否为背景像素,如果是,则将所述像素标记为噪声像素;如果不是,则确定所述像素为光斑像素,根据所述像素相邻像素的标记来标记该像素;相应的,The adjacent pixel judging and marking module is used to mark pixels smaller than the threshold as background pixels after being triggered by the threshold judging processing module, or judge whether the adjacent pixels of the pixel larger than the threshold are background pixels, and if so, set all The pixel is marked as a noise pixel; if not, it is determined that the pixel is a spot pixel, and the pixel is marked according to the marks of adjacent pixels of the pixel; correspondingly,
所述质心参数组累加模块,进一步用于根据相邻像素判断标记模块已标记的光斑像素的相邻像素的标记,对所述光斑像素进行质心参数组值累加和存储,并判断光斑图像的每个像素是否均已标记结束,确定结束时,触发质心坐标计算模块。The centroid parameter group accumulating module is further used to accumulate and store the centroid parameter group value of the spot pixel according to the marking of adjacent pixels of the spot pixel marked by the adjacent pixel judging and marking module, and judge each spot image Whether all pixels have been marked to end, when it is determined to end, trigger the center of mass coordinate calculation module.
其中,所述质心参数组累加模块对所述光斑像素进行质心参数组值累加和存储,具体为:Wherein, the centroid parameter group accumulation module performs centroid parameter group value accumulation and storage on the spot pixels, specifically:
确定当前像素的灰度值小于阈值,且当前像素的左方像素不是背景像素或噪声像素时,将左方像素标记对应的所属光斑质心参数组值进行累加存储;When it is determined that the gray value of the current pixel is less than the threshold, and the left pixel of the current pixel is not a background pixel or a noise pixel, the value of the centroid parameter group of the light spot corresponding to the left pixel mark is accumulated and stored;
确定当前像素的灰度值大于阈值,且当前像素的左方像素和上方像素为两个标记值不同的有效光斑像素时,将左方像素标记对应的质心参数组值与上方像素标记对应的质心参数组值进行累加,并将左方像素所属光斑标记更新为上方像素所属光斑标记。When it is determined that the gray value of the current pixel is greater than the threshold, and the left pixel and the upper pixel of the current pixel are two effective spot pixels with different tag values, the centroid parameter group value corresponding to the left pixel tag is compared with the centroid corresponding to the upper pixel tag The value of the parameter group is accumulated, and the spot mark to which the left pixel belongs is updated to the spot mark to which the upper pixel belongs.
其中,所述质心参数组累加模块不对真正噪声像素进行质心参数组值的累加和存储,具体为:Wherein, the centroid parameter group accumulation module does not carry out the accumulation and storage of the centroid parameter group values for the real noise pixels, specifically:
确定当前像素的灰度值小于阈值,且当前像素的左方像素为噪声像素标记时,则左方像素为真正噪声像素,不进行质心参数组数值的累加存储。When it is determined that the gray value of the current pixel is less than the threshold, and the left pixel of the current pixel is marked as a noise pixel, then the left pixel is a real noise pixel, and the value of the centroid parameter group is not accumulated and stored.
本发明提供的抗单点噪声的光斑中心定位方法及装置,依次将光斑图像的每个像素的灰度值与预设的阈值进行比较,将灰度值小于阈值的像素标记为背景像素,对于灰度值大于阈值的像素,判断其相邻像素是否为背景像素,如果是,则将当前像素标记为噪声像素;如果不是,则确定当前像素为光斑像素,根据当前像素的相邻像素的标记来标记当前光斑像素;根据相邻像素的标记,对光斑像素进行质心参数组值累加和存储,不对真正噪声像素进行质心参数组值累加和存储;确定光斑图像的每个像素均已标记结束后,根据各光斑的最终质心参数组累加值计算各光斑的质心行列坐标。本发明可在光斑图像的光斑中心提取过程中,识别出图像中的噪声点并去除,节省数据存储空间,同时实现实现光斑中心的实时提取。The spot center positioning method and device against single-point noise provided by the present invention sequentially compare the gray value of each pixel of the spot image with a preset threshold value, and mark the pixels whose gray value is smaller than the threshold value as background pixels. For a pixel whose gray value is greater than the threshold, judge whether its adjacent pixel is a background pixel. If yes, mark the current pixel as a noise pixel; if not, determine that the current pixel is a spot pixel. to mark the current spot pixel; according to the marking of adjacent pixels, the centroid parameter group value is accumulated and stored for the spot pixel, and the centroid parameter group value is not accumulated and stored for the real noise pixel; after confirming that each pixel of the spot image has been marked , calculate the row and column coordinates of the centroid of each spot according to the accumulated value of the final centroid parameter set of each spot. The invention can identify and remove noise points in the image during the extraction process of the spot center of the spot image, save data storage space, and realize real-time extraction of the spot center at the same time.
此外,由于本发明提取光斑中心操作与去除噪声点操作并行处理,可实现光斑中心的实时提取,保证了光斑图像的处理速度;同时,两个并行操作可通过现场可编程门阵列(FPGA)或专用集成电路(ASIC)来实现,有效利用FPGA或ASIC的并行处理能力,可避免现有技术中需在PC机或ARM处理器中实现的预处理操作,也就是说,只需通过FPGA或ASIC即可实现光斑中心的定位及噪声点的去除,因此,可满足器件的集成化和小型化要求。In addition, since the operation of extracting the spot center and the operation of removing noise points are processed in parallel in the present invention, the real-time extraction of the spot center can be realized, which ensures the processing speed of the spot image; meanwhile, the two parallel operations can be performed through a field programmable gate array (FPGA) or Application-specific integrated circuit (ASIC) to achieve, effectively use the parallel processing capability of FPGA or ASIC, can avoid the preprocessing operation that needs to be realized in PC or ARM processor in the prior art, that is to say, only need pass FPGA or ASIC The positioning of the center of the light spot and the removal of noise points can be realized, so the requirements of integration and miniaturization of devices can be met.
附图说明 Description of drawings
图1为本发明抗单点噪声的光斑中心定位方法的实现流程示意图;Fig. 1 is the implementation flow schematic diagram of the spot center localization method of anti-single-point noise of the present invention;
图2为本发明所述根据当前像素相邻像素的标记来标记当前像素的方法实现流程示意图;Fig. 2 is a schematic diagram of the implementation process of the method for marking the current pixel according to the marking of the adjacent pixels of the current pixel according to the present invention;
图3为本发明实施例中光斑像素标记过程中的图像示意图;FIG. 3 is a schematic diagram of an image during spot pixel marking in an embodiment of the present invention;
图4为本发明实施例中光斑中的光斑像素均标记结束后的图像示意图;Fig. 4 is a schematic diagram of an image after all the pixels of the light spot in the light spot are marked in the embodiment of the present invention;
图5为本发明抗单点噪声的光斑中心定位装置的结构示意图。FIG. 5 is a schematic structural diagram of a spot center positioning device for resisting single-point noise in the present invention.
具体实施方式 Detailed ways
本发明的基本思想是:依次将光斑图像的每个像素的灰度值与预设的阈值进行比较,将灰度值小于阈值的像素标记为背景像素,对于灰度值大于阈值的像素,判断其相邻像素是否为背景像素,如果是,则将当前像素标记为噪声像素;如果不是,则确定当前像素为光斑像素,根据当前像素的相邻像素的标记来标记当前光斑像素;The basic idea of the present invention is: sequentially compare the gray value of each pixel of the spot image with the preset threshold, mark the pixels whose gray value is smaller than the threshold as background pixels, and judge the pixels whose gray value is larger than the threshold Whether its adjacent pixel is a background pixel, if yes, mark the current pixel as a noise pixel; if not, determine that the current pixel is a spot pixel, and mark the current spot pixel according to the marks of the adjacent pixels of the current pixel;
根据相邻像素的标记,对光斑像素进行质心参数组值累加和存储,不对真正噪声像素进行质心参数组值累加和存储;确定光斑图像的每个像素均已标记结束后,根据各光斑的最终质心参数组累加值计算各光斑的质心行列坐标,从而可确定光斑中心。According to the marking of adjacent pixels, the centroid parameter group values are accumulated and stored for the spot pixels, and the centroid parameter group values are not accumulated and stored for the real noise pixels; after each pixel of the spot image has been marked, according to the final The centroid row and column coordinates of each light spot are calculated from the accumulated value of the centroid parameter group, so that the center of the light spot can be determined.
这里,在计算光斑的质心行列坐标时,采用一阶矩质心计算公式,如下:Here, when calculating the row and column coordinates of the centroid of the spot, the first-order moment centroid calculation formula is used, as follows:
其中,所述质心参数组值是指公式中的分子和分母的值,即灰度值与坐标值乘积的累加值和灰度值的累加值;所述I(x,y)表示像素的灰度值,所述x、y为该像素对应的行、列坐标,所述Xc、Yc分别为光斑质心的行、列坐标。Wherein, the centroid parameter group value refers to the value of the numerator and the denominator in the formula, that is, the cumulative value of the product of the gray value and the coordinate value and the cumulative value of the gray value; the I (x, y) represents the gray value of the pixel The x and y are the row and column coordinates corresponding to the pixel, and the Xc and Yc are the row and column coordinates of the spot centroid respectively.
本发明为了从光斑图像的背景中识别出像光斑,采用了对背景像素、噪声像素和光斑像素进行分别标记的方法,为此将当前像素的相邻像素设为:左方像素、上方像素、右上方像素,根据标记值可区分背景像素、噪声像素和光斑像素。In order to identify the image spot from the background of the spot image, the present invention adopts the method of separately marking the background pixel, the noise pixel and the spot pixel. For this reason, the adjacent pixels of the current pixel are set as: left pixel, upper pixel, For the upper right pixel, background pixels, noise pixels and speckle pixels can be distinguished according to the marker value.
这里,在对当前像素所属光斑质心参数组值执行累加操作时,对判断为噪声的像素不进行累加,从而实现实时去除噪声的目的。Here, when the accumulation operation is performed on the value of the spot centroid parameter group to which the current pixel belongs, the pixels judged to be noise are not accumulated, so as to achieve the purpose of real-time noise removal.
本发明中,对光斑图像进行从上到下、从左到右的顺序进行标记,即:从左上方的第一个像素开始,最后标记右下方的最后一个像素,当然,也可采用其它顺序对光斑图像的像素进行标记。In the present invention, the spot image is marked from top to bottom and from left to right, that is, starting from the first pixel on the upper left, and finally marking the last pixel on the lower right. Of course, other orders can also be used Mark the pixels of the spot image.
下面结合附图及具体实施例对本发明作进一步详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.
图1为本发明抗单点噪声的光斑中心定位方法的实现流程示意图,如图1所示,该方法的实现流程如下:Figure 1 is a schematic diagram of the implementation process of the spot center positioning method against single point noise of the present invention, as shown in Figure 1, the implementation process of the method is as follows:
步骤101:初始化相邻像素标记及光斑标记,之后读取光斑图像的第一个像素;Step 101: Initialize adjacent pixel marks and spot marks, and then read the first pixel of the spot image;
具体为:将上方像素、左方像素和右上方像素标记为背景像素,同时将光斑新标记初始化为光斑标记初始值,之后读取光斑图像的第一个像素。Specifically: mark the upper pixel, the left pixel and the upper right pixel as background pixels, and at the same time initialize the new mark of the light spot to the initial value of the light spot mark, and then read the first pixel of the light spot image.
本发明中,所述背景像素、噪声像素和光斑像素标记的初始值可为互不相等的任意值,标记的目的是为区分不同像素的类型。例如:可将背景像素的标记设为0,将噪声像素的标记设为1,将光斑标记初始值设为2,所述光斑由多个光斑像素组成,同一光斑中的所有光斑像素最终对应相同的所属光斑标记值。In the present invention, the initial values of the flags of the background pixels, noise pixels, and spot pixels can be arbitrary values that are not equal to each other, and the purpose of the flags is to distinguish different types of pixels. For example: the flag of the background pixel can be set to 0, the flag of the noise pixel can be set to 1, and the initial value of the spot flag can be set to 2. The spot is composed of multiple spot pixels, and all spot pixels in the same spot finally correspond to the same The tag value of the facula to which it belongs.
步骤102:判断当前像素的灰度值是否大于预设阈值,如果大于,则执行步骤103;如果小于,则执行步骤106;Step 102: judging whether the gray value of the current pixel is greater than the preset threshold, if greater, then perform
这里,所述预设的阈值可依据图像传感器的不同进行设置,不同图像传感器对应的阈值大小略有不同;对于灰度值大于预设阈值的像素可能为噪声点,也可能为光斑像素,需执行后续操作进一步判断。Here, the preset threshold can be set according to different image sensors, and the corresponding thresholds of different image sensors are slightly different; for pixels with a grayscale value greater than the preset threshold, they may be noise points or spot pixels. Perform follow-up operations for further judgment.
步骤103:判断当前像素的相邻像素是否为背景像素,如果是,则将当前像素标记为噪声像素,之后执行步骤108;如果不是,则确定当前像素为光斑像素,之后执行步骤104;Step 103: determine whether the adjacent pixel of the current pixel is a background pixel, if yes, mark the current pixel as a noise pixel, and then perform
具体为:判断当前像素的左方像素和上方像素是否为背景像素,例如:判断左方像素和上方像素的标记是否为0,如果是,则将当前像素标记为噪声像素,例如:将当前像素标记为1,之后执行步骤108;如果不是,则可确定当前像素属于有效光斑像素,之后执行步骤104。Specifically: determine whether the left pixel and the upper pixel of the current pixel are background pixels, for example: determine whether the marks of the left pixel and the upper pixel are 0, if so, mark the current pixel as a noise pixel, for example: set the current pixel If it is marked as 1, then step 108 is performed; if not, it can be determined that the current pixel belongs to an effective spot pixel, and then step 104 is performed.
步骤104:根据当前像素的相邻像素的标记来标记当前光斑像素;Step 104: mark the current spot pixel according to the marks of the adjacent pixels of the current pixel;
具体为:根据当前光斑像素的上方像素、左方像素和右上方像素的标记对当前像素进行标记,如图2所示,该步骤具体包括如下流程:Specifically: mark the current pixel according to the marks of the upper pixel, left pixel and upper right pixel of the current spot pixel, as shown in Figure 2, this step specifically includes the following process:
步骤104A:根据标记值判断当前像素的左方像素是否为噪声像素或背景像素,如果不是,则将当前像素标记为左方像素的标记值;否则,执行步骤104B;
具体为:通过左方像素的标记值判断当前像素的左方像素是否为噪声像素或背景像素,例如:判断当前像素左方像素的标记值是否大于1,如果大于1,则说明左方像素既不是噪声像素,也不是背景像素,即左方像素为光斑像素,则将当前像素标记为左方像素的标记值;否则,如果当前像素左方像素的标记值小于或等于1,则执行步骤104B。Specifically: judge whether the left pixel of the current pixel is a noise pixel or a background pixel by the mark value of the left pixel, for example: judge whether the mark value of the left pixel of the current pixel is greater than 1, if it is greater than 1, it means that the left pixel is If it is not a noise pixel or a background pixel, that is, the left pixel is a spot pixel, then mark the current pixel as the mark value of the left pixel; otherwise, if the mark value of the left pixel of the current pixel is less than or equal to 1, then perform
步骤104B:根据标记值判断当前像素的上方像素是否为噪声像素或背景像素,如果不是,则将当前像素标记为上方像素的标记值;否则,执行步骤104C;
具体为:通过上方像素的标记值判断当前像素的上方像素是否为噪声像素或背景像素,例如:判断当前像素上方像素的标记值是否大于1,如果大于1,则说明上方像素为光斑像素,则将当前像素标记为上方像素的标记值;否则,如果当前像素上方像素的标记值小于或等于1,则执行步骤104C。Specifically: judge whether the pixel above the current pixel is a noise pixel or a background pixel by the mark value of the above pixel, for example: judge whether the mark value of the pixel above the current pixel is greater than 1, if it is greater than 1, it means that the above pixel is a spot pixel, then Mark the current pixel as the marked value of the pixel above; otherwise, if the marked value of the pixel above the current pixel is less than or equal to 1, then perform
步骤104C:根据标记值判断当前像素的上方像素是否为噪声像素,同时判断当前像素的右上方像素是否不为噪声像素或背景像素,如果是,则将当前像素标记为右上方像素的标记值;否则,将当前像素标记为光斑新标记值。
具体为:通过标记值判断当前像素的上方像素是否为噪声像素,且当前像素的右上方像素是否不为噪声像素或背景像素,例如:判断当前像素的上方像素的标记值是否等于1,且当前像素的右上方像素的标记值是否大于1,如果是,则将当前像素标记为右上方像素的标记值;否则,将当前像素标记为另一个新的光斑标记,即当前光斑像素可能属于另一个不同的光斑,也可能是同一光斑,如果是同一光斑,可通过后续步骤105和步骤107,将不同标记的同一光斑质心参数组值进行合并累加。Specifically: judge whether the upper pixel of the current pixel is a noise pixel through the flag value, and whether the upper right pixel of the current pixel is not a noise pixel or a background pixel, for example: judge whether the flag value of the upper pixel of the current pixel is equal to 1, and the current Whether the mark value of the upper right pixel of the pixel is greater than 1, if yes, mark the current pixel as the mark value of the upper right pixel; otherwise, mark the current pixel as another new spot mark, that is, the current spot pixel may belong to another Different light spots may also be the same light spot. If they are the same light spot, the centroid parameter values of the same light spot with different marks can be merged and accumulated through
步骤105:判断当前像素的左方像素和上方像素是否为光斑像素,且两者的标记值是否相同,如果相同,执行步骤108;否则,执行步骤107。Step 105: Determine whether the left pixel and the upper pixel of the current pixel are spot pixels, and whether the flag values of the two are the same, if they are the same, perform
步骤107:将左方像素标记对应的质心参数组值与上方像素标记对应的质心参数组值进行累加,并将左方像素所属光斑标记更新为上方像素所属光斑标记;Step 107: Accumulate the centroid parameter set value corresponding to the left pixel mark and the centroid parameter set value corresponding to the upper pixel mark, and update the spot mark to which the left pixel belongs to the light spot mark to which the upper pixel belongs;
例如:以图3中所示的左下方光斑中的光斑像素为例,如果当前光斑像素的上方像素的标记值为4,左方像素标记值为5,则将标记5对应的质心参数组累加值与标记4对应的质心参数组累加值相加,结果更新为所属光斑4新的质心参数组累加值,并将标记5对应的所属光斑标记也更新为4,最终同一光斑包含的所有光斑像素的标记相同,如图4所示。For example: take the spot pixel in the lower left spot shown in Figure 3 as an example, if the mark value of the upper pixel of the current spot pixel is 4, and the mark value of the left pixel is 5, then the centroid parameter group corresponding to mark 5 is accumulated The value is added to the cumulative value of the centroid parameter group corresponding to mark 4, and the result is updated to the new cumulative value of the centroid parameter group corresponding to the
这里,针对图3需要说明的是:图中位于光斑中标记为1的像素为有效光斑像素,图中离散的标记为1的几个像素为有效噪声像素。Here, what needs to be explained with respect to FIG. 3 is that the pixels marked 1 in the light spot in the figure are effective light spot pixels, and the discrete pixels marked 1 in the figure are effective noise pixels.
步骤106:将当前像素标记为背景像素,并更新光斑标记值,同时判断当前像素的左方像素是否为光斑像素,如果是,则累加并存储左方像素标记对应的所属光斑质心参数组值,之后执行步骤108;否则,不进行质心参数组值累加和存储,直接执行步骤108;Step 106: mark the current pixel as a background pixel, update the value of the spot mark, and judge whether the left pixel of the current pixel is a spot pixel, and if so, accumulate and store the value of the centroid parameter group of the light spot corresponding to the left pixel mark, Execute
具体为:将当前像素标记为背景像素,例如:将当前像素的标记值设为0,并将光斑标记值更新为不等于噪声像素标记或背景像素标记,并且不等于当前光斑标记值的任何一个值,用于标记下一个光斑。同时,判断当前像素的左方像素是否为光斑像素,例如:判断当前像素的左方像素的标记值是否大于1,如果大于1,则表明左方像素为光斑像素,则累加并存储所述左像素标记对应的所属光斑质心参数组值,之后执行步骤108;否则,如果左方像素的标记值等于1或小于1,则左方像素为真正噪声像素或背景,不进行质心参数组值累加存储,直接执行步骤108。Specifically: mark the current pixel as a background pixel, for example: set the mark value of the current pixel to 0, and update the spot mark value to be not equal to the noise pixel mark or the background pixel mark, and not equal to any one of the current light spot mark value Value, used to mark the next spot. At the same time, judge whether the left pixel of the current pixel is a spot pixel, for example: judge whether the mark value of the left pixel of the current pixel is greater than 1, if it is greater than 1, it indicates that the left pixel is a spot pixel, then accumulate and store the left The pixel mark corresponds to the value of the centroid parameter group of the facula, and then perform
本发明中,对有效光斑质心参数组累加存储的规则为:当光斑一行有效像素结束时,将该行对应的所属光斑质心参数组值进行累加存储,当遇到同一光斑有不同标记时,将不同标记的质心参数组值进行合并累加,并将不同标记对应的所属光斑标记更新为同一所属光斑标记。In the present invention, the rule for accumulative storage of the effective spot centroid parameter group is: when a row of effective pixels of the spot ends, the value of the corresponding spot centroid parameter group corresponding to the row is accumulated and stored, and when the same spot has different marks, the The centroid parameter group values of different markers are merged and accumulated, and the corresponding facula markers of different markers are updated to the same facula marker.
步骤108:判断当前像素是否为一行像素的最后一个,如果是,则将左方像素标记初始化为背景像素,并执行步骤110;否则,执行步骤109;Step 108: judge whether the current pixel is the last one of a row of pixels, if so, initialize the left pixel mark as a background pixel, and execute
具体为:判断当前像素是否为一行像素的最后一个,例如:设光斑图像为1024x1024像素的图像,则可判断当前像素是否为某一行像素的第1024个像素,如果是,则将左方像素初始化为背景像素,以用于对下一行第一个像素进行判断,并执行步骤110;否则,执行步骤109。Specifically: judge whether the current pixel is the last one of a row of pixels, for example: if the spot image is an image of 1024x1024 pixels, it can be judged whether the current pixel is the 1024th pixel of a row of pixels, if so, initialize the left pixel is the background pixel for judging the first pixel in the next row, and execute
步骤109:更新当前像素的相邻像素标记,同时存储当前像素的标记值,之后读取该行下个像素,并执行步骤102;Step 109: update the adjacent pixel mark of the current pixel, and store the mark value of the current pixel at the same time, then read the next pixel of the row, and execute
具体为:将当前像素的左方像素标记更新为当前像素标记,将当前像素的上方像素标记更新为右上方像素标记,将当前像素的右上方像素标记更新为当前右上方像素相邻的右方像素的标记,以备读取该行的下一个像素,并存储当前像素的标记值,之后读取该行下一个像素,返回步骤102。Specifically: update the left pixel mark of the current pixel to the current pixel mark, update the upper pixel mark of the current pixel to the upper right pixel mark, and update the upper right pixel mark of the current pixel to the right side adjacent to the current upper right pixel The mark of the pixel is ready to read the next pixel of the row, and store the mark value of the current pixel, then read the next pixel of the row, and return to step 102.
步骤110:判断当前一行是否为光斑图像的最后一行,如果不是,则执行步骤111;如果是,则执行步骤112;Step 110: judge whether the current row is the last row of the spot image, if not, execute step 111; if yes, execute
具体为:判断当前一行是否为光斑图像的最后一行,例如:设光斑图像为1024x1024像素的图像,则可判断当前一行是否为某一列像素的第1024个像素,如果不是,则执行步骤111;如果是,则执行步骤112。Specifically: judge whether the current row is the last row of the spot image, for example: if the spot image is an image of 1024×1024 pixels, then it can be judged whether the current row is the 1024th pixel of a certain column of pixels, if not, then execute step 111; if If yes, go to step 112.
步骤111:更新当前像素的相邻像素标记,之后读取下一行第一个像素,并执行步骤102;Step 111: update the adjacent pixel mark of the current pixel, then read the first pixel in the next row, and execute
具体为:更新当前像素的上方像素标记和右上方像素标记,更新方法与步骤108中所述方法相同,之后读取下一行第一个像素,并执行步骤102。Specifically: update the upper pixel mark and the upper right pixel mark of the current pixel, the update method is the same as that described in
步骤112:根据各光斑的最终质心参数组累加值计算各光斑的质心行列坐标;Step 112: Calculate the centroid row and column coordinates of each spot according to the accumulated value of the final centroid parameter group of each spot;
具体为:根据各光斑的最终质心参数组累加值,按照一阶矩质心计算公式计算各光斑的质心行列坐标,即实现了光斑中心的定位,该步骤的计算方法为现有技术,此处不再详述。Specifically, according to the accumulated value of the final centroid parameter group of each spot, the row and column coordinates of the centroid of each spot are calculated according to the first-order moment centroid calculation formula, that is, the positioning of the center of the spot is realized. The calculation method of this step is a prior art, which is not described here. More details.
为实现上述方法,本发明还提供了一种抗单点噪声的光斑中心定位装置,如图4所示,该装置包括:光斑像素识别模块、质心参数组累加模块和质心坐标计算模块;其中,In order to realize the above method, the present invention also provides a spot center positioning device against single point noise, as shown in Figure 4, the device includes: spot pixel identification module, centroid parameter group accumulation module and centroid coordinate calculation module; wherein,
所述光斑像素识别模块,用于被质心参数组累加模块触发时,依次将外部输入的光斑图像的每个像素的灰度值与预设的阈值进行比较,确定小于阈值时,将所述像素标记为背景像素;确定大于阈值时,判断所述像素的相邻像素是否为背景像素,如果是,则将所述像素标记为噪声像素;如果不是,则确定所述像素为光斑像素,根据所述像素相邻像素的标记来标记该像素;The spot pixel identification module is configured to sequentially compare the gray value of each pixel of the externally input spot image with a preset threshold when triggered by the centroid parameter group accumulation module, and when it is determined to be less than the threshold, the pixel Mark it as a background pixel; when it is determined that it is greater than the threshold, judge whether the adjacent pixel of the pixel is a background pixel, if yes, then mark the pixel as a noise pixel; if not, then determine that the pixel is a spot pixel, according to the mark the pixel by marking the pixels adjacent to the pixel;
所述质心参数组累加模块,用于根据光斑像素识别模块已标记的光斑像素的相邻像素的标记,对所述光斑像素进行质心参数组值累加和存储,且不对真正噪声像素进行质心参数组值的累加和存储,并判断光斑图像的每个像素是否均已标记结束,确定结束时,触发质心坐标计算模块;The centroid parameter group accumulation module is used for accumulating and storing the centroid parameter group value of the spot pixel according to the marking of adjacent pixels of the spot pixel marked by the spot pixel identification module, and not performing the centroid parameter set for the real noise pixel Accumulate and store the values, and judge whether each pixel of the spot image has been marked to end, and when the end is determined, trigger the centroid coordinate calculation module;
所述质心坐标计算模块,用于被质心参数组累加模块触发时,根据质心参数组累加模块所得的各光斑的最终质心参数组累加值计算各光斑的质心行列坐标。The centroid coordinate calculation module is configured to calculate the centroid row and column coordinates of each spot according to the final centroid parameter set accumulation value of each spot obtained by the centroid parameter set accumulation module when triggered by the centroid parameter set accumulation module.
所述光斑像素识别模块进一步包括:阈值判断处理模块和相邻像素判断标记模块;其中,The spot pixel identification module further includes: a threshold judgment processing module and an adjacent pixel judgment marking module; wherein,
所述阈值判断处理模块,用于被质心参数组累加模块触发时,依次将外部输入的光斑图像的每个像素的灰度值与预设的阈值进行比较,确定小于或大于阈值时,触发相邻像素判断标记模块;The threshold judgment processing module is configured to sequentially compare the gray value of each pixel of the externally input spot image with a preset threshold when triggered by the centroid parameter group accumulation module, and when it is determined to be less than or greater than the threshold, trigger the corresponding Adjacent pixel judgment marking module;
所述相邻像素判断标记模块,用于被阈值判断处理模块触发后,将小于阈值的像素标记为背景像素,或判断大于阈值的像素的相邻像素是否为背景像素,如果是,则将所述像素标记为噪声像素;如果不是,则确定所述像素为光斑像素,根据所述像素相邻像素的标记来标记该像素;相应的,The adjacent pixel judging and marking module is used to mark pixels smaller than the threshold as background pixels after being triggered by the threshold judging processing module, or judge whether the adjacent pixels of the pixel larger than the threshold are background pixels, and if so, set all The pixel is marked as a noise pixel; if not, it is determined that the pixel is a spot pixel, and the pixel is marked according to the marks of adjacent pixels of the pixel; correspondingly,
所述质心参数组累加模块,进一步用于根据相邻像素判断标记模块已标记的光斑像素的相邻像素的标记,对所述光斑像素进行质心参数组值累加和存储,并判断光斑图像的每个像素是否均已标记结束,确定结束时,触发质心坐标计算模块。The centroid parameter group accumulating module is further used to accumulate and store the centroid parameter group value of the spot pixel according to the marking of adjacent pixels of the spot pixel marked by the adjacent pixel judging and marking module, and judge each spot image Whether all pixels have been marked to end, when it is determined to end, trigger the center of mass coordinate calculation module.
所述质心参数组累加模块对所述光斑像素进行质心参数组值累加和存储,具体为:The centroid parameter group accumulation module performs centroid parameter group value accumulation and storage on the spot pixels, specifically:
确定当前像素的灰度值小于阈值,且当前像素的左方像素不是背景像素或噪声像素时,将左方像素标记对应的所属光斑质心参数组值进行累加存储;When it is determined that the gray value of the current pixel is less than the threshold, and the left pixel of the current pixel is not a background pixel or a noise pixel, the value of the centroid parameter group of the light spot corresponding to the left pixel mark is accumulated and stored;
确定当前像素的灰度值大于阈值,且当前像素的左方像素和上方像素为两个标记值不同的有效光斑像素时,将左方像素标记对应的质心参数组值与上方像素标记对应的质心参数组值进行累加,并将左方像素所属光斑标记更新为上方像素所属光斑标记。When it is determined that the gray value of the current pixel is greater than the threshold, and the left pixel and the upper pixel of the current pixel are two effective spot pixels with different tag values, the centroid parameter group value corresponding to the left pixel tag is compared with the centroid corresponding to the upper pixel tag The value of the parameter group is accumulated, and the spot mark to which the left pixel belongs is updated to the spot mark to which the upper pixel belongs.
所述质心参数组累加模块不对真正噪声像素进行质心参数组值的累加和存储,具体为:The centroid parameter group accumulation module does not carry out the accumulation and storage of the centroid parameter group value to the real noise pixel, specifically:
确定当前像素的灰度值小于阈值,且当前像素的左方像素为噪声像素标记时,则左方像素为真正噪声像素,不进行质心参数组数值的累加存储。When it is determined that the gray value of the current pixel is less than the threshold, and the left pixel of the current pixel is marked as a noise pixel, then the left pixel is a real noise pixel, and the value of the centroid parameter group is not accumulated and stored.
在实际应用过程中,可采用FPGA或ASIC来实现本发明的装置,具体如下:In the actual application process, FPGA or ASIC can be adopted to realize the device of the present invention, specifically as follows:
可在光斑像素识别模块中设置阈值比较器、左标记寄存器、上标记寄存器、右上标记寄存器、新标记寄存器、当前标记寄存器、光斑标记判断器、噪声标记判断器、行比较器、列比较器和光斑索引寄存器;其中,The threshold comparator, left flag register, upper flag register, right upper flag register, new flag register, current flag register, spot flag judger, noise flag judger, row comparator, column comparator and Spot index register; where,
所述阈值比较器,用于判断当前像素的灰度值是否大于预设阈值;The threshold comparator is used to judge whether the gray value of the current pixel is greater than a preset threshold;
所述左标记寄存器、上标记寄存器、右上标记寄存器、新标记寄存器和当前标记寄存器,分别用于存储并输出对应的左方像素、上方像素、右上方像素、新的标记值和当前像素的标记值;The left flag register, the upper flag register, the upper right flag register, the new flag register and the current flag register are respectively used to store and output the corresponding left pixel, upper pixel, upper right pixel, new flag value and flag of the current pixel value;
所述光斑标记判断器和噪声标记判断器,用于判断灰度值大于阈值的当前像素属于哪个有效光斑的像素,或者当前像素可能为噪声点像素;The spot mark determiner and the noise mark determiner are used to determine which effective spot pixel the current pixel whose gray value is greater than the threshold belongs to, or the current pixel may be a noise point pixel;
所述行比较器,用于判断当前一行像素是否为当前图像的最后一行;The row comparator is used to judge whether the current row of pixels is the last row of the current image;
所述列比较器,用于判断当前像素是否为一行像素的最后一个像素;The column comparator is used to determine whether the current pixel is the last pixel of a row of pixels;
所述光斑索引寄存器,用于存储像素标记所对应的所属光斑的标记,从而建立像素标记与光斑标记的索引,以保证各光斑质心参数组值的正确累加。The light spot index register is used to store the mark of the light spot corresponding to the pixel mark, so as to establish the index of the pixel mark and the light spot mark, so as to ensure the correct accumulation of the centroid parameter group values of each light spot.
另外,可在质心参数组累加模块中设置行乘法器、列乘法器、行加法器、列加法器、灰度加法器、行参数存储器、列参数存储器、灰度参数存储器;其中,In addition, a row multiplier, a column multiplier, a row adder, a column adder, a grayscale adder, a row parameter memory, a column parameter memory, and a grayscale parameter memory can be set in the centroid parameter group accumulation module; wherein,
所述行乘法器和列乘法器,分别用于计算像素灰度值与行坐标的乘积、以及像素灰度值与列坐标的乘积;The row multiplier and the column multiplier are respectively used to calculate the product of the pixel gray value and the row coordinate, and the product of the pixel gray value and the column coordinate;
所述行加法器、列加法器和灰度加法器,分别用于累加当前像素灰度值与行坐标的乘积、灰度值与列坐标的乘积,以及当前像素灰度值与其所属光斑当前所对应的参数组值;The row adder, column adder, and grayscale adder are respectively used to accumulate the product of the current pixel grayscale value and the row coordinate, the product of the grayscale value and the column coordinate, and the current pixel grayscale value and the current location of the current pixel grayscale value and its associated light spot. The corresponding parameter group value;
所示行参数存储器、列参数存储器和灰度参数存储器,分别用于存储各对应光斑的质心参数组值。The shown row parameter memory, column parameter memory and gray scale parameter memory are respectively used to store the centroid parameter group value of each corresponding light spot.
此外,可在质心坐标计算模块中设置行坐标除法器和列坐标除法器,分别用于计算各个光斑对应质心的行坐标和列坐标。In addition, a row coordinate divider and a column coordinate divider may be set in the centroid coordinate calculation module to calculate the row coordinate and column coordinate of each light spot corresponding to the centroid.
当然,在实际应用过程中,所述光斑像素识别模块、质心参数组累加模块和质心坐标计算模块的内部结构还可以采用其它组合方式。Certainly, in the actual application process, the internal structures of the spot pixel identification module, the centroid parameter group accumulation module and the centroid coordinate calculation module can also adopt other combinations.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention, and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the within the protection scope of the present invention.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 201010244422 CN102193819B (en) | 2010-08-03 | 2010-08-03 | Single-point noise resistant method and device for positioning light spot center |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 201010244422 CN102193819B (en) | 2010-08-03 | 2010-08-03 | Single-point noise resistant method and device for positioning light spot center |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102193819A CN102193819A (en) | 2011-09-21 |
| CN102193819B true CN102193819B (en) | 2013-01-23 |
Family
ID=44601932
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 201010244422 Active CN102193819B (en) | 2010-08-03 | 2010-08-03 | Single-point noise resistant method and device for positioning light spot center |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102193819B (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102564457B (en) * | 2011-12-29 | 2014-07-02 | 北京控制工程研究所 | On-orbit noise autonomous restraint method for APS star sensor |
| CN103617611B (en) * | 2013-11-12 | 2016-08-17 | 清华大学 | A kind of automatic threshold segmentation spot center and size detecting method |
| CN103913166B (en) * | 2014-03-12 | 2016-09-14 | 哈尔滨工程大学 | A kind of punctate opacity of the cornea extracting method based on Energy distribution |
| CN107153834B (en) * | 2017-04-14 | 2020-12-15 | 北京中安未来科技有限公司 | Image recognition light spot processing method and device |
| CN107452026A (en) * | 2017-08-08 | 2017-12-08 | 何佳芮 | A kind of processing system and its method for image spot barycenter |
| CN112330611B (en) * | 2020-10-22 | 2024-07-05 | 南京航空航天大学 | A high parallel spot segmentation method for FPGA |
| CN114283170B (en) * | 2021-12-24 | 2024-05-03 | 北京元客视界科技有限公司 | Light spot extraction method |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63150605A (en) * | 1986-12-15 | 1988-06-23 | Komatsu Ltd | Light spot position detector |
| JP4001196B2 (en) * | 1999-10-12 | 2007-10-31 | パイオニア株式会社 | Information recording apparatus and information reproducing apparatus |
| CN100371676C (en) * | 2006-11-01 | 2008-02-27 | 北京航空航天大学 | Fast and high-precision spot image centroid location method and device |
| JP5153466B2 (en) * | 2008-06-11 | 2013-02-27 | 日本発條株式会社 | Dimple position detection method |
| CN100580365C (en) * | 2008-09-17 | 2010-01-13 | 北京航空航天大学 | A dual-channel centroid-following imaging method and device |
-
2010
- 2010-08-03 CN CN 201010244422 patent/CN102193819B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN102193819A (en) | 2011-09-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102193819B (en) | Single-point noise resistant method and device for positioning light spot center | |
| CN112489126B (en) | Vehicle key point information detection method, vehicle control method and device and vehicle | |
| US11205276B2 (en) | Object tracking method, object tracking device, electronic device and storage medium | |
| CN108960211B (en) | Multi-target human body posture detection method and system | |
| JP7026165B2 (en) | Text recognition method and text recognition device, electronic equipment, storage medium | |
| CN110738101A (en) | Behavior recognition method and device and computer readable storage medium | |
| CN108985199B (en) | Detection method and device for commodity taking and placing operation and storage medium | |
| CN108364010A (en) | A kind of licence plate recognition method, device, equipment and computer readable storage medium | |
| CN111191611B (en) | Traffic sign identification method based on deep learning | |
| CN111191557B (en) | Mark identification positioning method, mark identification positioning device and intelligent equipment | |
| CN112016514B (en) | Traffic sign recognition method, device, equipment and storage medium | |
| CN115131759B (en) | Traffic marking recognition method, device, computer equipment and storage medium | |
| CN111157012B (en) | Robot navigation method and device, readable storage medium and robot | |
| CN109214280A (en) | Shop recognition methods, device, electronic equipment and storage medium based on streetscape | |
| CN108716916B (en) | A distributed parallel planet point centroid extraction method and FPGA implementation device based on super block | |
| CN100371676C (en) | Fast and high-precision spot image centroid location method and device | |
| CN108596115A (en) | A kind of vehicle checking method, apparatus and system based on convolutional neural networks | |
| CN107392201A (en) | The pillar recognition methods of catenary mast, storage medium, processing equipment | |
| CN111709377B (en) | Feature extraction method, target re-identification method and device and electronic equipment | |
| CN109492639A (en) | " loaded " position three-dimensional coordinate acquisition methods, system and image recognition apparatus | |
| CN109508571B (en) | Strip-space positioning method and device, electronic equipment and storage medium | |
| CN110533699B (en) | Dynamic multi-frame velocity measurement method for pixel change based on optical flow method | |
| CN117333686A (en) | Target positioning methods, devices, equipment and media | |
| CN108847031A (en) | Traffic behavior monitoring method, device, computer equipment and storage medium | |
| CN109508716B (en) | Image character positioning method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C53 | Correction of patent for invention or patent application | ||
| CB03 | Change of inventor or designer information |
Inventor after: Jiang Jie Inventor after: Fan Qiaoyun Inventor after: Zhang Guangjun Inventor after: Wei Xinguo Inventor before: Fan Qiaoyun Inventor before: Zhang Guangjun Inventor before: Jiang Jie Inventor before: Wei Xinguo |
|
| COR | Change of bibliographic data |
Free format text: CORRECT: INVENTOR; FROM: FAN QIAOYUN ZHANG GUANGJUN JIANG JIE WEI XINGUO TO: JIANG JIE FAN QIAOYUN ZHANG GUANGJUN WEI XINGUO |
|
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |