[go: up one dir, main page]

CN116524303A - Intelligent auxiliary labeling method and device for remote sensing image - Google Patents

Intelligent auxiliary labeling method and device for remote sensing image Download PDF

Info

Publication number
CN116524303A
CN116524303A CN202310501840.5A CN202310501840A CN116524303A CN 116524303 A CN116524303 A CN 116524303A CN 202310501840 A CN202310501840 A CN 202310501840A CN 116524303 A CN116524303 A CN 116524303A
Authority
CN
China
Prior art keywords
remote sensing
value
sensing image
edge
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310501840.5A
Other languages
Chinese (zh)
Inventor
李康平
殷崎栋
田淇元
柳伟
霍志航
李玉萍
王江安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tudou Data Technology Group Co ltd
Original Assignee
Tudou Data Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tudou Data Technology Group Co ltd filed Critical Tudou Data Technology Group Co ltd
Priority to CN202310501840.5A priority Critical patent/CN116524303A/en
Publication of CN116524303A publication Critical patent/CN116524303A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses an intelligent auxiliary labeling method and device for remote sensing images, and relates to the technical field of image labeling. The method comprises the following steps: constructing a total cost function according to the preprocessed remote sensing image; each pixel point of the remote sensing image is used as a node of the connected weighted graph, and the cost value of the weighted edge of the adjacent pixel points is determined according to the total cost function; the total cost function is configured to enable the cost value of the weighted edges among the pixel points on the edge of the ground object of the remote sensing image to be smaller than the preset cost value; and drawing the shortest path between adjacent mark points according to the mark points sequentially input by an operator along the ground object edge of the remote sensing image to form a preliminary contour. The method can improve the labeling efficiency of the labeling personnel, save manpower and material resources and effectively solve the problem that the labeling accuracy is reduced due to fatigue of the labeling personnel.

Description

一种遥感图像智能辅助标注方法及装置A remote sensing image intelligent auxiliary labeling method and device

技术领域technical field

本申请涉及图像标注技术领域,尤其涉及一种遥感图像智能辅助标注方法及装置。The present application relates to the technical field of image labeling, in particular to a method and device for intelligent auxiliary labeling of remote sensing images.

背景技术Background technique

图像标注是计算机视觉类产品研究和开发的基础,无论是面部识别、无人机勘察、医疗诊断还是自动驾驶,图像标注发挥着不可替代的作用。图像标注是将标签附加到图像上的过程。在图像标注过程中,可以是对整个图像打上一个标签,也可以是对图像中每一组像素打上多个标签。这些标签由工程师预先确定,并被选中为计算机视觉模型提供图像中所显示的对象的信息。在地理信息领域,获得遥感测绘图像后,需要对其进行分割处理,分割出遥感图像中存在的各类区域并分别附加标签,完成标注。以标注结果为遥感测绘提供参考,提高遥感测绘的精度。在此过程中,需要大量的标注数据。Image annotation is the basis for the research and development of computer vision products. Whether it is facial recognition, drone survey, medical diagnosis or automatic driving, image annotation plays an irreplaceable role. Image annotation is the process of attaching labels to images. In the process of image annotation, one label can be applied to the entire image, or multiple labels can be applied to each group of pixels in the image. These labels are predetermined by engineers and selected to provide the computer vision model with information about the objects shown in the image. In the field of geographic information, after the remote sensing mapping image is obtained, it needs to be segmented, and various regions in the remote sensing image are segmented and labeled separately to complete the labeling. Use the marked results to provide reference for remote sensing surveying and mapping, and improve the accuracy of remote sensing surveying and mapping. In this process, a large amount of labeled data is required.

目前市场上的进行图像分割的数据标注方法为人工标注法与智能标注法,人工标注法需要标注员对图像进行阅读与识别,然后利用鼠标沿着图中的目标不断点击以此来勾画出目标对象的边缘轮廓,最终对图像作出正确标注。这种传统的人工标注方式效率较低,且需要耗费大量人力,严重影响工作效率。并且在长时间标注工作后,标注员会因疲劳而造成标注准确率下降。智能标注法虽能克服人工标注法的缺陷,但在投入工作前需要大量的标注数据进行训练,还是需要依赖人工标注提供训练样本,且训练样本的质量会直接影响到智能标注的精准度。At present, the data labeling methods for image segmentation in the market are manual labeling method and intelligent labeling method. The manual labeling method requires the labeler to read and recognize the image, and then use the mouse to continuously click along the target in the picture to outline the target. The edge contour of the object, and finally correctly label the image. This traditional manual labeling method is inefficient and requires a lot of manpower, seriously affecting work efficiency. And after a long time of labeling work, the labeling accuracy rate will drop due to fatigue. Although the intelligent labeling method can overcome the shortcomings of the manual labeling method, it requires a large amount of labeling data for training before putting into work, and still needs to rely on manual labeling to provide training samples, and the quality of the training samples will directly affect the accuracy of intelligent labeling.

发明内容Contents of the invention

本申请实施例通过提供一种遥感图像智能辅助标注方法,解决了现有技术中人工标注效率较低,且需要耗费大量人力,严重影响工作效率,且在长时间标注工作后,标注员会因疲劳而造成标注准确率下降,实现了一种辅助标注员进行遥感图像标注的方法,提高标注员的工作效率,并且能够保证标注的准确率。The embodiment of the present application provides an intelligent auxiliary labeling method for remote sensing images, which solves the problem that the manual labeling efficiency in the prior art is low and requires a lot of manpower, which seriously affects the work efficiency. Fatigue caused a decline in the accuracy of labeling. A method for assisting labelers in remote sensing image labeling was realized, which improved the work efficiency of labelers and ensured the accuracy of labeling.

第一方面,本申请实施例提供了一种遥感图像智能辅助标注方法,包括:根据预处理的遥感图像构建总代价函数;将所述遥感图像的每个像素点作为连通加权图的节点,并根据所述总代价函数确定相邻像素点的加权边的代价值;其中,所述总代价函数被配置为使处于所述遥感图像的地物边缘上的像素点之间加权边的代价值小于预设代价值;根据操作人员沿所述遥感图像的地物边缘依次输入的标记点,绘制相邻所述标记点之间的最短路径,形成初步轮廓。In the first aspect, the embodiment of the present application provides an intelligent auxiliary labeling method for remote sensing images, including: constructing a total cost function according to the preprocessed remote sensing images; using each pixel of the remote sensing images as a node of the connected weighted graph, and Determine the cost value of the weighted edge of adjacent pixels according to the total cost function; wherein, the total cost function is configured to make the cost value of the weighted edge between pixels on the edge of the remote sensing image less than A preset cost value; according to the marking points sequentially input by the operator along the edge of the remote sensing image, the shortest path between the adjacent marking points is drawn to form a preliminary outline.

结合第一方面,在第一种可能的实现方式中,所述根据预处理的遥感图像构建总代价函数,包括:获取所述遥感图像的强边缘点值;计算所述遥感图像的像素点梯度幅值与像素点梯度方向代价;对所述强边缘点值、所述像素点梯度幅值与所述像素点梯度方向代价进行加权求和,形成所述总代价函数。With reference to the first aspect, in a first possible implementation manner, the constructing the total cost function according to the preprocessed remote sensing image includes: obtaining the strong edge point value of the remote sensing image; calculating the pixel point gradient of the remote sensing image Amplitude and pixel gradient direction cost; performing weighted summation on the strong edge point value, the pixel gradient magnitude and the pixel gradient direction cost to form the total cost function.

结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述获取所述遥感图像的强边缘点值,包括:对所述遥感图像进行地物边缘检测;对所述遥感图像进行灰度化处理,并根据所述遥感图像的灰度图的像素值确定强边缘点值;所述强边缘点值公式如下:With reference to the first possible implementation of the first aspect, in the second possible implementation, the acquiring the strong edge point value of the remote sensing image includes: performing edge detection on the remote sensing image; The remote sensing image is grayscaled, and the strong edge point value is determined according to the pixel value of the grayscale image of the remote sensing image; the strong edge point value formula is as follows:

式中,I(p)为边缘检测与灰度化后所述遥感图像中地物边缘的像素点p的像素值,Z为强边缘点,fZ(p)为强边缘点值。In the formula, I(p) is the pixel value of the pixel point p on the edge of the object in the remote sensing image after edge detection and gray scale, Z is the strong edge point, and f Z (p) is the value of the strong edge point.

结合第一方面,在第三种可能的实现方式中,所述绘制相邻所述标记点之间的最短路径,包括:迭代计算相邻所述标记点之间的第一代价值,并将所述第一代价值最小的所述标记点作为父节点;遍历所述遥感图像的地物边缘上的所有所述父节点,并连接相邻的所述父节点得到所述标记点之间的最短路径。With reference to the first aspect, in a third possible implementation manner, the drawing the shortest path between the adjacent marked points includes: iteratively calculating the first generation value between the adjacent marked points, and The mark point with the minimum value of the first generation is used as a parent node; traverse all the parent nodes on the feature edge of the remote sensing image, and connect the adjacent parent nodes to obtain the distance between the mark points shortest path.

结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述依次计算相邻所述标记点之间的第一代价值,包括:遍历所述标记点,并将所述标记点加入节点队列;依次将所述标记点作为起点,并将所述起点的初始代价值设为0;遍历所述起点的邻域内的邻域节点,计算加入所述节点队列的所述邻域节点到所述起点的第一代价值;其中,若所述邻域节点在所述起点的对角线上,则给所述第一代价值乘以 With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the sequentially calculating the first generation value between adjacent marked points includes: traversing the marked points, and Add the marked point to the node queue; use the marked point as the starting point in turn, and set the initial cost value of the starting point to 0; traverse the neighborhood nodes in the neighborhood of the starting point, and calculate the number of points added to the node queue The first-generation value from the neighborhood node to the starting point; wherein, if the neighborhood node is on the diagonal of the starting point, multiply the first-generation value by

结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中,所述将所述第一代价值最小的所述标记点作为父节点,包括:若所述第一代价值与所述起点的初始代价之和小于所述邻域节点的代价值,则将所述第一代价值赋予所述邻域节点;将此时的所述起点定义为所述邻域节点的父节点,并将所述起点移出所述节点队列。With reference to the fourth possible implementation of the first aspect, in the fifth possible implementation, the use of the marker point with the smallest value of the first generation as the parent node includes: if the first generation value and the initial cost sum of the starting point is less than the cost value of the neighborhood node, then the first generation value is given to the neighborhood node; the starting point at this time is defined as the neighborhood node parent node, and remove the origin from the node queue.

结合第一方面,在第六种可能的实现方式中,所述形成初步轮廓,还包括:将所述初步轮廓转换为二值图;基于二值图对所述初步轮廓的外部轮廓进行寻找,获得所述外部轮廓的轮廓点集坐标;根据所述遥感图像的地理坐标信息将所述轮廓点集由像素坐标转为地理坐标并生成地理坐标文件;根据响应的人工操作对所述地理坐标文件进行修注直至所述初步轮廓满足精度要求。With reference to the first aspect, in a sixth possible implementation manner, the forming the preliminary contour further includes: converting the preliminary contour into a binary image; searching for an outer contour of the preliminary contour based on the binary image, Obtaining the coordinates of the contour point set of the outer contour; converting the contour point set from pixel coordinates to geographic coordinates according to the geographic coordinate information of the remote sensing image and generating a geographic coordinate file; Correction is performed until the preliminary profile meets the accuracy requirements.

第二方面,本申请实施例提供了一种遥感图像智能辅助标注装置,其特征在于,包括:总代价函数模块,用于根据预处理的遥感图像构建总代价函数;连通加权图模块,用于将所述遥感图像的每个像素点作为连通加权图的节点,并根据所述总代价函数确定相邻像素点的加权边的代价值;其中,所述总代价函数被配置为使处于所述遥感图像的地物边缘上的像素点之间加权边的代价值小于预设代价值;初步轮廓模块,用于根据操作人员沿所述遥感图像的地物边缘依次输入的标记点,绘制相邻所述标记点之间的最短路径,形成初步轮廓。In the second aspect, the embodiment of the present application provides an intelligent auxiliary labeling device for remote sensing images, which is characterized in that it includes: a total cost function module for constructing a total cost function according to the preprocessed remote sensing images; a connected weighted graph module for Each pixel of the remote sensing image is used as a node of the connected weighted graph, and the cost value of the weighted edge of the adjacent pixel is determined according to the total cost function; wherein the total cost function is configured to make the The cost value of the weighted edge between the pixel points on the edge of the remote sensing image is less than the preset cost value; the preliminary outline module is used to draw adjacent The shortest path between the marked points forms a preliminary contour.

结合第二方面,在第一种可能的实现方式中,所述根据预处理的遥感图像构建总代价函数,包括:获取所述遥感图像的强边缘点值;计算所述遥感图像的像素点梯度幅值与像素点梯度方向代价;对所述强边缘点值、所述像素点梯度幅值与所述像素点梯度方向代价进行加权求和,形成所述总代价函数。With reference to the second aspect, in a first possible implementation manner, the constructing the total cost function according to the preprocessed remote sensing image includes: obtaining the strong edge point value of the remote sensing image; calculating the pixel point gradient of the remote sensing image Amplitude and pixel gradient direction cost; performing weighted summation on the strong edge point value, the pixel gradient magnitude and the pixel gradient direction cost to form the total cost function.

结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述获取所述遥感图像的强边缘点值,包括:对所述遥感图像进行地物边缘检测;对所述遥感图像进行灰度化处理,并根据所述遥感图像的灰度图的像素值确定强边缘点值;所述强边缘点值公式如下:With reference to the first possible implementation of the second aspect, in the second possible implementation, the acquiring the strong edge point value of the remote sensing image includes: performing object edge detection on the remote sensing image; The remote sensing image is grayscaled, and the strong edge point value is determined according to the pixel value of the grayscale image of the remote sensing image; the strong edge point value formula is as follows:

式中,I(p)为边缘检测与灰度化后所述遥感图像中地物边缘的像素点p的像素值,Z为强边缘点,fZ(p)为强边缘点值。In the formula, I(p) is the pixel value of the pixel point p on the edge of the object in the remote sensing image after edge detection and gray scale, Z is the strong edge point, and f Z (p) is the value of the strong edge point.

结合第二方面,在第三种可能的实现方式中,所述绘制相邻所述标记点之间的最短路径,包括:迭代计算相邻所述标记点之间的第一代价值,并将所述第一代价值最小的所述标记点作为父节点;遍历所述遥感图像的地物边缘上的所有所述父节点,并连接相邻的所述父节点得到所述标记点之间的最短路径。With reference to the second aspect, in a third possible implementation manner, the drawing the shortest path between the adjacent marked points includes: iteratively calculating the first generation value between the adjacent marked points, and The mark point with the minimum value of the first generation is used as a parent node; traverse all the parent nodes on the feature edge of the remote sensing image, and connect the adjacent parent nodes to obtain the distance between the mark points shortest path.

结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述依次计算相邻所述标记点之间的第一代价值,包括:遍历所述标记点,并将所述标记点加入节点队列;依次将所述标记点作为起点,并将所述起点的初始代价值设为0;遍历所述起点的邻域内的邻域节点,计算加入所述节点队列的所述邻域节点到所述起点的第一代价值;其中,若所述邻域节点在所述起点的对角线上,则给所述第一代价值乘以 With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner, the sequentially calculating the first-generation values between adjacent marked points includes: traversing the marked points, and Add the marked point to the node queue; use the marked point as the starting point in turn, and set the initial cost value of the starting point to 0; traverse the neighborhood nodes in the neighborhood of the starting point, and calculate the number of points added to the node queue The first-generation value from the neighborhood node to the starting point; wherein, if the neighborhood node is on the diagonal of the starting point, multiply the first-generation value by

结合第二方面的第四种可能的实现方式,在第五种可能的实现方式中,所述将所述第一代价值最小的所述标记点作为父节点,包括:若所述第一代价值与所述起点的初始代价之和小于所述邻域节点的代价值,则将所述第一代价值赋予所述邻域节点;将此时的所述起点定义为所述邻域节点的父节点,并将所述起点移出所述节点队列。With reference to the fourth possible implementation manner of the second aspect, in the fifth possible implementation manner, using the marker point with the smallest value of the first generation as the parent node includes: if the first generation value and the initial cost sum of the starting point is less than the cost value of the neighborhood node, then the first generation value is given to the neighborhood node; the starting point at this time is defined as the neighborhood node parent node, and remove the origin from the node queue.

结合第二方面,在第六种可能的实现方式中,所述形成初步轮廓,还包括:将所述初步轮廓转换为二值图;基于二值图对所述初步轮廓的外部轮廓进行寻找,获得所述外部轮廓的轮廓点集坐标;根据所述遥感图像的地理坐标信息将所述轮廓点集由像素坐标转为地理坐标并生成地理坐标文件;根据响应的人工操作对所述地理坐标文件进行修注直至所述初步轮廓满足精度要求。With reference to the second aspect, in a sixth possible implementation manner, the forming the preliminary contour further includes: converting the preliminary contour into a binary image; searching for an outer contour of the preliminary contour based on the binary image, Obtaining the coordinates of the contour point set of the outer contour; converting the contour point set from pixel coordinates to geographic coordinates according to the geographic coordinate information of the remote sensing image and generating a geographic coordinate file; Correction is performed until the preliminary profile meets the accuracy requirements.

第三方面,本申请实施例提供了一种设备,所述设备包括:处理器;用于存储处理器可执行指令的存储器;所述处理器执行所述可执行指令时,实现如第一方面或第一方面任一种可能实现的方式所述的方法。In a third aspect, an embodiment of the present application provides a device, the device comprising: a processor; a memory for storing processor-executable instructions; when the processor executes the executable instructions, the implementation of the first aspect Or the method described in any possible implementation manner of the first aspect.

第四方面,本申请实施例提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质包括用于存储计算机程序或指令,当该计算机程序或指令被执行时,使如第一方面或第一方面任一种可能实现的方式所述的方法被实现。In a fourth aspect, the embodiment of the present application provides a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium includes a computer program or instruction for storing, when the computer program or instruction is executed When, the method described in the first aspect or any possible implementation manner of the first aspect is implemented.

本申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

本申请实施例通过构建代价函数并以遥感图像的像素点为节点建立连通加权图,能够获得遥感图像中的地物边缘,再计算地物边缘轮廓上相邻点的最短距离,获得地物边缘的初步轮廓。有效解决了现有技术中需要标注员长时间集中注意力逐点标注,进而实现了一种辅助标注的方法,标注员仅需在遥感图像上粗略地圈出地物边缘即可形成较为准确的初步轮廓,再经过人工修注,即可得到满足准确度要求的标注图像,能够避免标注员长时间的逐点标注,进而提高标注效率,节约人力物力。In the embodiment of the present application, by constructing a cost function and establishing a connected weighted graph with the pixels of the remote sensing image as nodes, the edge of the feature in the remote sensing image can be obtained, and then the shortest distance between adjacent points on the edge contour of the feature can be calculated to obtain the edge of the feature preliminary outline. It effectively solves the need for annotators to focus on point-by-point annotation for a long time in the existing technology, and then realizes a method of auxiliary annotation. Annotators only need to roughly circle the edges of ground objects on remote sensing images to form a more accurate After the preliminary outline, and then manual annotation, annotated images that meet the accuracy requirements can be obtained, which can avoid the long-term point-by-point annotation by the annotator, thereby improving the efficiency of annotation and saving manpower and material resources.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments of the present application or in the description of the prior art. Obviously, the accompanying drawings in the following description are some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为本申请实施例提供的遥感图像智能辅助标注方法的流程图;Fig. 1 is a flow chart of the remote sensing image intelligent auxiliary labeling method provided by the embodiment of the present application;

图2为本申请实施例提供的构建总代价函数的流程图;Fig. 2 is the flowchart of constructing the total cost function provided by the embodiment of the present application;

图3为本申请实施例提供的绘制相邻标记点之间的最短路径的流程图;FIG. 3 is a flowchart of drawing the shortest path between adjacent marking points provided by the embodiment of the present application;

图4为本申请实施例提供的遥感图像智能辅助标注装置的示意图。Fig. 4 is a schematic diagram of an intelligent auxiliary labeling device for remote sensing images provided by an embodiment of the present application.

具体实施方式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. Apparently, the described embodiments are some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

图1是本申请实施例提供的遥感图像智能辅助标注方法的流程图,包括步骤101至步骤103。其中,图1仅为本申请实施例示出的一种执行顺序,并不代表遥感图像智能辅助标注方法的唯一执行顺序,在可实现最终结果的情况下,图1所示出的步骤可以被并列或颠倒执行。FIG. 1 is a flowchart of a method for intelligently assisted labeling of remote sensing images provided by an embodiment of the present application, including steps 101 to 103. Among them, Fig. 1 is only an execution sequence shown in the embodiment of the present application, and does not represent the only execution sequence of the remote sensing image intelligent auxiliary labeling method. In the case where the final result can be achieved, the steps shown in Fig. 1 can be paralleled Or do it upside down.

步骤101:根据预处理的遥感图像构建总代价函数。在本申请实施例中,构建总代价函数之前需要对获取的遥感图像进行预处理。以下示出一种预处理方法,本领域技术人员应当认识到,可以对这里描述的预处理实施例做出各种改变和修改,而不会背离本申请的范围和精神。具体包括:对获取的遥感图像进行滤波处理,以突出遥感图像中的地物边缘。在此步骤中,本申请示例性使用双边滤波,本领域技术人员亦可使用其他方法实现边缘突出的效果。此外,本领域技术人员可根据实际情况在此步骤前加入其他去噪平滑操作。Step 101: Construct a total cost function according to the preprocessed remote sensing image. In the embodiment of the present application, the acquired remote sensing images need to be preprocessed before constructing the total cost function. A preprocessing method is shown below, and those skilled in the art should recognize that various changes and modifications can be made to the preprocessing embodiment described here without departing from the scope and spirit of the present application. It specifically includes: filtering the acquired remote sensing image to highlight the edge of the ground object in the remote sensing image. In this step, the present application uses bilateral filtering as an example, and those skilled in the art may also use other methods to achieve the edge highlighting effect. In addition, those skilled in the art may add other denoising and smoothing operations before this step according to actual conditions.

步骤101的具体实现方式如图2所示,包括步骤201至步骤203,具体为:The specific implementation of step 101 is shown in Figure 2, including steps 201 to 203, specifically:

步骤201:获取遥感图像的强边缘点值。具体为,对遥感图像进行地物边缘检测。为获得较为精确地物边缘,此处示例性采用HED边缘检测算法检测遥感图像的地物边缘。亦可替换为Canny算法,但Canny算法与HED边缘检测算法相比精确度稍低。对边缘检测后的遥感图像进行灰度化处理,并根据遥感图像的灰度图的像素值确定强边缘点值;强边缘点值公式如下:Step 201: Obtain the strong edge point values of the remote sensing image. Specifically, edge detection of ground objects is performed on remote sensing images. In order to obtain more accurate object edges, the HED edge detection algorithm is exemplarily used here to detect the object edges of the remote sensing image. It can also be replaced by the Canny algorithm, but the accuracy of the Canny algorithm is slightly lower than that of the HED edge detection algorithm. Perform grayscale processing on the remote sensing image after edge detection, and determine the strong edge point value according to the pixel value of the grayscale image of the remote sensing image; the strong edge point value formula is as follows:

式中,I(p)为边缘检测与灰度化后遥感图像中地物边缘的像素点p的像素值,Z为强边缘点,fZ(p)为强边缘点值。灰度化后的遥感图像的像素值为0-255,在本申请实施例中,将像素值200以上的地物边缘像素点作为强边缘点。强边缘点值代表边缘特性,边缘特性较高的像素点其代价值较低。故像素值200以上的地物边缘像素点的强边缘点值为0,像素值200及以下的地物边缘像素点的强边缘点值为1。在本申请实施例中,进行灰度化处理后,还可以进行高斯滤波处理,消除图像中的高斯噪声。In the formula, I(p) is the pixel value of the pixel point p on the edge of the ground object in the remote sensing image after edge detection and gray scale, Z is the strong edge point, and f Z (p) is the value of the strong edge point. The pixel value of the grayscaled remote sensing image is 0-255. In the embodiment of the present application, the edge pixel points with a pixel value above 200 are regarded as strong edge points. Strong edge point values represent edge characteristics, and pixels with higher edge characteristics have lower cost values. Therefore, the strong edge point value of the feature edge pixel point with a pixel value above 200 is 0, and the strong edge point value of the feature edge pixel point with a pixel value of 200 or below is 1. In the embodiment of the present application, Gaussian filtering may also be performed after grayscale processing to eliminate Gaussian noise in the image.

步骤202:计算遥感图像的像素点梯度幅值与像素点梯度方向代价。在本申请实施例中,像素点梯度幅值fG(p),公式如下:Step 202: Calculate the pixel point gradient magnitude and pixel point gradient direction cost of the remote sensing image. In the embodiment of this application, the pixel point gradient magnitude f G (p), the formula is as follows:

式中,fG(p)为像素点梯度幅值,G为像素点梯度,p为像素点,sx,sy分别为遥感图像x方向与y方向的梯度。像素点梯度越大,边缘特征越明显,代价值就越低。In the formula, f G (p) is the magnitude of the gradient of the pixel point, G is the gradient of the pixel point, p is the pixel point, sx, sy are the gradients of the remote sensing image in the x direction and y direction, respectively. The larger the pixel gradient, the more obvious the edge features, and the lower the cost value.

像素点梯度方向代价fD(p,q),公式如下:Pixel gradient direction cost f D (p,q), the formula is as follows:

式中,fD(p,q)为像素点梯度方向代价,p与q为像素点,D为像素点梯度方向,dp为像素点p的方向梯度以及像素点p与q的向量之积,dq为像素点q的方向梯度以及像素点p与q的向量之积。像素点梯度方向代价能起到边缘平滑的作用,故在边界变化剧烈处设置较高的代价值,边界变化平缓处设置较低的代价值。In the formula, f D (p, q) is the gradient direction cost of the pixel point, p and q are the pixel point, D is the gradient direction of the pixel point, dp is the product of the direction gradient of the pixel point p and the vector of the pixel point p and q, dq is the product of the directional gradient of pixel q and the vectors of pixel p and q. The pixel gradient direction cost can play a role in edge smoothing, so set a higher cost value at the place where the boundary changes sharply, and set a lower cost value at the place where the boundary change is gentle.

步骤203:对强边缘点值、像素点梯度幅值与像素点梯度方向代价进行加权求和,形成总代价函数。在本申请实施例中,总代价函数如下:Step 203: Perform weighted summation of the strong edge point value, pixel point gradient magnitude and pixel point gradient direction cost to form a total cost function. In the embodiment of this application, the total cost function is as follows:

L(p,q)=w1fZ(p)+w2fG(p)+w3fD(p,q)L (p,q) =w 1 f Z (p)+w 2 f G (p)+w 3 f D (p,q)

式中,fZ(p)为强边缘点值,fG(p)为像素点梯度幅值,fD(p,q)为像素点梯度方向代价,p与q为两像素点,w1,w2,w3为权值。在本申请实施例中,w1+w2+w3=1,且0.7≤w1≤0.83,0.03≤w2≤0.05,0.12≤w3≤0.25;示例性地,w1=0.83,w2=0.03,w3=0.14时能达到本申请较好的效果。In the formula, f Z (p) is the strong edge point value, f G (p) is the pixel gradient magnitude, f D (p,q) is the pixel gradient direction cost, p and q are two pixel points, w 1 , w 2 , w 3 are weights. In the embodiment of the present application, w 1 +w 2 +w 3 =1, and 0.7≤w 1 ≤0.83, 0.03≤w 2 ≤0.05, 0.12≤w 3 ≤0.25; for example, w 1 =0.83, w 2 = 0.03, w 3 = 0.14 can achieve the better effect of this application.

步骤102:将遥感图像的每个像素点作为连通加权图的节点,并根据总代价函数确定相邻像素点的加权边的代价值。其中,总代价函数被配置为使处于遥感图像的地物边缘上的像素点之间加权边的代价值小于预设代价值。具体为,以遥感图像的每个像素点为节点构建连通加权图,并且连通加权图的每个节点都被赋予不同的代价值,相邻像素点之间有一条加权边,加权边的代价值由定义的总代价函数计算得到。Step 102: Take each pixel of the remote sensing image as a node of the connected weighted graph, and determine the cost value of the weighted edge of the adjacent pixel according to the total cost function. Wherein, the total cost function is configured so that the cost value of the weighted edge between the pixel points on the edge of the remote sensing image is smaller than the preset cost value. Specifically, each pixel of the remote sensing image is used as a node to construct a connected weighted graph, and each node of the connected weighted graph is assigned a different cost value. There is a weighted edge between adjacent pixels, and the cost value of the weighted edge Computed from the defined total cost function.

此外,图像标注的目的是把地物边缘轮廓找到进而生成训练神经网络模型的标签,故最短路径的代价函数与边缘特征有密切的关系,边缘特征越显著的像素点之间的代价值越低,以确保最短路径尽可能地贴近地物的边缘。为确保寻找到的遥感图像中地物边缘尽可能贴近地物,在定义代价函数时需确保处于地物边缘上的像素点之间加权边的代价值小于预设代价值,此处的预设代价值由本领域技术人员根据经验或多次实验结果进行设置。In addition, the purpose of image labeling is to find the edge contour of the ground object and then generate a label for training the neural network model, so the cost function of the shortest path is closely related to the edge features, and the cost value between pixels with more prominent edge features is lower , to ensure that the shortest path is as close as possible to the edge of the object. In order to ensure that the edge of the ground object in the remote sensing image is as close as possible to the ground object, when defining the cost function, it is necessary to ensure that the cost value of the weighted edge between the pixels on the edge of the ground object is less than the preset cost value. Here, the preset The cost value is set by those skilled in the art based on experience or multiple experimental results.

步骤103:根据操作人员沿遥感图像的地物边缘依次输入的标记点,绘制相邻标记点之间的最短路径,形成初步轮廓。在本申请实施例中,沿着地物边缘移动鼠标,鼠标位置即为标记点,绘制相邻标记点之间的最短路径。绘制相邻标记点之间的最短路径的具体步骤如图3所示,包括步骤301至步骤302,如下:Step 103: Draw the shortest path between adjacent marked points according to the marked points sequentially input by the operator along the edge of the remote sensing image to form a preliminary outline. In the embodiment of the present application, the mouse is moved along the edge of the feature, and the position of the mouse is the marked point, and the shortest path between adjacent marked points is drawn. The specific steps of drawing the shortest path between adjacent marked points are as shown in Figure 3, including step 301 to step 302, as follows:

步骤301:迭代计算相邻标记点之间的第一代价值,并将第一代价值最小的标记点作为父节点。迭代计算相邻标记点之间的第一代价值。具体为,遍历标记点,并将标记点加入节点队列;依次将标记点作为起点,并将起点的初始代价值设为0;遍历起点的邻域内的邻域节点,计算加入节点队列的邻域节点到起点的第一代价值;其中,若邻域节点在起点的对角线上,则给第一代价值乘以在本申请实施例中,邻域节点为起点邻域周围上下左右与四个对角这八个方向上的八个像素点。Step 301: iteratively calculate the first-generation value between adjacent marker points, and use the marker point with the smallest first-generation value as a parent node. Iteratively computes the first-generation values between adjacent marker points. Specifically, traverse the marked points, and add the marked points to the node queue; take the marked points as the starting point in turn, and set the initial cost value of the starting point to 0; traverse the neighborhood nodes in the neighborhood of the starting point, and calculate the neighborhood that is added to the node queue The first-generation value from the node to the starting point; among them, if the neighbor node is on the diagonal of the starting point, the first-generation value is multiplied by In the embodiment of the present application, the neighborhood nodes are eight pixel points in the eight directions of up, down, left, right, and four diagonal directions around the starting point neighborhood.

将第一代价值最小的标记点作为父节点。具体为,若第一代价值与起点的初始代价之和小于邻域节点的代价值,则将第一代价值赋予邻域节点;将此时的起点定义为邻域节点的父节点,并将起点移出节点队列。在本申请实施例中,用第一代价值与起点的初始代价之和与邻域内的邻域节点代价值进行比较,由于起点的初始代价值设为0,此处实际为第一代价值与邻域节点的代价值进行比较,若第一代价值小于领域内节点的初始代价值,则将第一代价值赋予领域节点,将此时的起点定义为邻域节点的父节点,并将起点移出节点队列。依次处理所有标记点,直至迭代计算完所有标记点,即此步骤中的节点队列为空。Take the first-generation marker with the smallest value as the parent node. Specifically, if the sum of the first generation value and the initial cost of the starting point is less than the cost value of the neighborhood node, the first generation value is given to the neighborhood node; the starting point at this time is defined as the parent node of the neighborhood node, and The origin is removed from the node queue. In the embodiment of this application, the sum of the first generation value and the initial cost of the starting point is compared with the cost value of the neighborhood nodes in the neighborhood. Since the initial cost value of the starting point is set to 0, here is actually the first generation value and The cost value of the neighborhood node is compared, if the first generation value is less than the initial cost value of the node in the domain, the first generation value is given to the domain node, the starting point at this time is defined as the parent node of the neighborhood node, and the starting point Dequeue a node. Process all markers in turn until all markers are iteratively calculated, that is, the node queue in this step is empty.

步骤302:遍历遥感图像的地物边缘上的所有父节点,并连接相邻的父节点得到标记点之间的最短路径。在本申请实施例中,使用鼠标沿着地物边缘进行回溯,不断寻找当前边缘节点的父节点。直至找到所有父节点,连接相邻的父节点得到相邻标记点之间的最短路径。所有相邻的父节点之间的连接边构成地物的初步轮廓。Step 302: traverse all parent nodes on the edge of the remote sensing image, and connect adjacent parent nodes to obtain the shortest path between the marked points. In the embodiment of the present application, the mouse is used to backtrack along the edge of the feature, and the parent node of the current edge node is constantly searched for. Until all parent nodes are found, connect adjacent parent nodes to get the shortest path between adjacent marked points. The connection edges between all adjacent parent nodes constitute the preliminary outline of the ground object.

在本申请实施例中,得到地物的初步轮廓后,将初步轮廓转换为二值图;基于二值图对初步轮廓的外部轮廓进行寻找,获得外部轮廓的轮廓点集坐标;根据遥感图像的地理坐标信息将轮廓点集由像素坐标转为地理坐标并生成地理坐标文件;根据响应的人工操作对地理坐标文件进行修注直至初步轮廓满足精度要求。示例性地,地理坐标文件可以为SHP文件、JSON文件、GML文件等。形成的初步轮廓已经较为准确,此时仅需人工对初步轮廓进行修注,调整部分即可得到满足标准度要求的标注文件。In the embodiment of the present application, after obtaining the preliminary outline of the ground object, the preliminary outline is converted into a binary image; based on the binary image, the outer outline of the initial outline is searched to obtain the outline point set coordinates of the outer outline; according to the remote sensing image The geographic coordinate information converts the contour point set from pixel coordinates to geographic coordinates and generates a geographic coordinate file; according to the corresponding manual operation, the geographic coordinate file is revised until the preliminary outline meets the accuracy requirements. Exemplarily, the geographical coordinate file may be an SHP file, a JSON file, a GML file, and the like. The formed preliminary outline is already relatively accurate. At this time, it is only necessary to manually repair and annotate the preliminary outline, and the adjusted part can obtain an annotation file that meets the standard degree requirements.

虽然本申请提供了如实施例或流程图的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。本实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或客户端产品执行时,可以按照本实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。Although the present application provides method operation steps such as embodiments or flowcharts, more or less operation steps may be included based on routine or non-inventive efforts. The order of steps listed in this embodiment is only one way of execution order of many steps, and does not represent the only execution order. When executed by an actual device or client product, the methods shown in this embodiment or the drawings may be executed sequentially or in parallel (for example, in a parallel processor or multi-thread processing environment).

如图4所示,本申请实施例还提供一种遥感图像智能辅助标注装置400。该装置包括:总代价函数模块401、连通加权图模块402与初步轮廓模块403。As shown in FIG. 4 , the embodiment of the present application also provides an apparatus 400 for intelligent auxiliary labeling of remote sensing images. The device includes: a total cost function module 401 , a connectivity weighted graph module 402 and a preliminary contour module 403 .

总代价函数模块401用于根据预处理的遥感图像构建总代价函数。总代价函数模块401具体用于:获取遥感图像的强边缘点值;计算遥感图像的像素点梯度幅值与像素点梯度方向代价;对强边缘点值、像素点梯度幅值与像素点梯度方向代价进行加权求和,形成总代价函数。The total cost function module 401 is used to construct a total cost function according to the preprocessed remote sensing image. The total cost function module 401 is specifically used to: obtain the strong edge point value of the remote sensing image; calculate the pixel gradient magnitude and pixel gradient direction cost of the remote sensing image; calculate the strong edge point value, pixel gradient magnitude and pixel gradient direction The costs are weighted and summed to form the total cost function.

连通加权图模块402用于将遥感图像的每个像素点作为连通加权图的节点,并根据总代价函数确定相邻像素点的加权边的代价值。其中,总代价函数被配置为使处于遥感图像的地物边缘上的像素点之间加权边的代价值小于预设代价值。连通加权图模块402具体用于:The connected weighted graph module 402 is used to use each pixel point of the remote sensing image as a node of the connected weighted graph, and determine the cost value of the weighted edge of adjacent pixel points according to the total cost function. Wherein, the total cost function is configured so that the cost value of the weighted edge between the pixel points on the edge of the remote sensing image is smaller than the preset cost value. The connected weighted graph module 402 is specifically used for:

初步轮廓模块403用于根据操作人员沿遥感图像的地物边缘依次输入的标记点,绘制相邻标记点之间的最短路径,形成初步轮廓。初步轮廓模块403具体用于:迭代计算相邻标记点之间的第一代价值,并将第一代价值最小的标记点作为父节点;遍历遥感图像的地物边缘上的所有父节点,并连接相邻的父节点得到标记点之间的最短路径。迭代计算相邻标记点之间的第一代价值,具体包括:遍历标记点,并将标记点加入节点队列;依次将标记点作为起点,并将起点的初始代价值设为0;遍历起点的邻域内的邻域节点,计算加入节点队列的邻域节点到起点的第一代价值;其中,若邻域节点在起点的对角线上,则给第一代价值乘以将第一代价值最小的标记点作为父节点,具体包括:若第一代价值与起点的初始代价之和小于邻域节点的代价值,则将第一代价值赋予邻域节点;将此时的起点定义为邻域节点的父节点,并将起点移出节点队列。形成初步轮廓,还包括:将初步轮廓转换为二值图;基于二值图对初步轮廓的外部轮廓进行寻找,获得外部轮廓的轮廓点集坐标;根据遥感图像的地理坐标信息将轮廓点集由像素坐标转为地理坐标并生成地理坐标文件;根据响应的人工操作对地理坐标文件进行修注直至初步轮廓满足精度要求。The preliminary outline module 403 is used to draw the shortest path between adjacent marked points according to the marked points sequentially input by the operator along the edge of the remote sensing image to form a preliminary outline. The preliminary outline module 403 is specifically used to: iteratively calculate the first-generation value between adjacent marker points, and use the marker point with the smallest first-generation value as the parent node; traverse all parent nodes on the feature edge of the remote sensing image, and Connect adjacent parent nodes to get the shortest path between marked points. Iteratively calculate the first-generation value between adjacent marker points, specifically including: traversing the marker points and adding the marker points to the node queue; taking the marker points as the starting point in turn, and setting the initial cost value of the starting point to 0; traversing the starting point Neighborhood nodes in the neighborhood, calculate the first-generation value from the neighborhood node that joins the node queue to the starting point; among them, if the neighborhood node is on the diagonal of the starting point, multiply the first-generation value by Take the mark point with the smallest value of the first generation as the parent node, specifically including: if the sum of the value of the first generation and the initial cost of the starting point is less than the cost value of the neighborhood node, assign the value of the first generation to the neighborhood node; The start point of is defined as the parent node of the neighborhood node, and the start point is removed from the node queue. Forming the preliminary contour also includes: converting the preliminary contour into a binary image; searching the outer contour of the preliminary contour based on the binary image to obtain the coordinates of the contour point set of the outer contour; The pixel coordinates are converted into geographic coordinates and a geographic coordinate file is generated; the geographic coordinate file is revised and annotated according to the corresponding manual operation until the preliminary outline meets the accuracy requirements.

本申请所述装置中的部分模块可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构、类等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。Some of the modules of the apparatus described herein may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

上述申请实施例阐明的装置或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。为了描述方便,描述以上装置时以功能分为各种模块分别描述。在实施本申请实施例时可以把各模块的功能在同一个或多个软件和/或硬件中实现。当然,也可以将实现某功能的模块由多个子模块或子单元组合实现。The devices or modules described in the embodiments of the above application may be specifically implemented by computer chips or entities, or by products with certain functions. For the convenience of description, when describing the above devices, the functions are divided into various modules and described separately. When implementing the embodiments of the present application, the functions of each module may be implemented in one or more pieces of software and/or hardware. Of course, a module that realizes a certain function may also be implemented by a combination of multiple submodules or subunits.

本申请中所述的方法、装置或模块可以以计算机可读程序代码方式实现控制器按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(英文:Application Specific Integrated Circuit;简称:ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内部包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The methods, devices or modules described in this application can be implemented in computer readable program code. The controller can be implemented in any suitable way. Computer-readable media for computer-readable program code (such as software or firmware) executed by a device, logic gates, switches, application-specific integrated circuits (English: Application Specific Integrated Circuit; abbreviated: ASIC), programmable logic controllers, and embedded microcontrollers Examples of the controller include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as a part of the control logic of the memory. Those skilled in the art also know that, in addition to realizing the controller in a purely computer-readable program code mode, it is entirely possible to make the controller use logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded The same function can be realized in the form of a microcontroller or the like. Therefore, this kind of controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as the structure in the hardware component. Or even, means for realizing various functions can be regarded as a structure within both a software module realizing a method and a hardware component.

本申请实施例还提供了一种设备,所述设备包括:处理器;用于存储处理器可执行指令的存储器;所述处理器执行所述可执行指令时,实现如本申请实施例所述的方法。The embodiment of the present application also provides a device, the device includes: a processor; a memory for storing processor-executable instructions; when the processor executes the executable instructions, the implementation as described in the embodiment of the present application Methods.

本申请实施例还提供了一种非易失性计算机可读存储介质,其上存储有计算机程序或指令,当该计算机程序或指令被执行时,使如本申请实施例中所述的方法被实现。The embodiment of the present application also provides a non-volatile computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is executed, the method as described in the embodiment of the present application is executed accomplish.

此外,在本发明的各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独存在,也可以两个或两个以上模块集成在一个模块中。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, each module may exist independently, or two or more modules may be integrated into one module.

上述存储介质包括但不限于随机存取存储器(英文:Random Access Memory;简称:RAM)、只读存储器(英文:Read-Only Memory;简称:ROM)、缓存(英文:Cache)、硬盘(英文:Hard Disk Drive;简称:HDD)或者存储卡(英文:Memory Card)。所述存储器可以用于存储计算机程序指令。The above-mentioned storage medium includes but not limited to random access memory (English: Random Access Memory; abbreviation: RAM), read-only memory (English: Read-Only Memory; abbreviation: ROM), cache (English: Cache), hard disk (English: Hard Disk Drive (abbreviation: HDD) or memory card (English: Memory Card). The memory may be used to store computer program instructions.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的硬件的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,也可以通过数据迁移的实施过程中体现出来。该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,移动终端,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。It can be known from the above description of the implementation manners that those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the existing technology can be embodied in the form of software products, or it can be reflected in the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions to make a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) execute this Apply the methods described in each embodiment or some parts of the embodiments.

本说明书中的各个实施方式采用递进的方式描述,各个实施方式之间相同或相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。本申请的全部或者部分可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、移动通信终端、多处理器系统、基于微处理器的系统、可编程的电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。The various implementations in this specification are described in a progressive manner, the same or similar parts of the various implementations can be referred to each other, and each implementation focuses on the differences from other implementations. This application, in whole or in part, can be used in numerous general purpose or special purpose computer system environments or configurations. Examples: personal computers, server computers, handheld or portable devices, tablet-type devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, etc.

以上实施例仅用以说明本申请的技术方案,而非对本申请限制;尽管参照前述实施例对本申请进行了详细的说明,本领域普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请技术方案的范围。The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be described in the foregoing embodiments Modifications to the technical solutions, or equivalent replacement of some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the present application.

Claims (10)

1.一种遥感图像智能辅助标注方法,其特征在于,包括:1. A remote sensing image intelligent auxiliary labeling method, characterized in that it comprises: 根据预处理的遥感图像构建总代价函数;Construct the total cost function according to the preprocessed remote sensing image; 将所述遥感图像的每个像素点作为连通加权图的节点,并根据所述总代价函数确定相邻像素点的加权边的代价值;Using each pixel of the remote sensing image as a node of the connected weighted graph, and determining the cost value of the weighted edge of the adjacent pixel according to the total cost function; 其中,所述总代价函数被配置为使处于所述遥感图像的地物边缘上的像素点之间加权边的代价值小于预设代价值;Wherein, the total cost function is configured to make the cost value of the weighted edge between the pixel points on the edge of the remote sensing image less than the preset cost value; 根据操作人员沿所述遥感图像的地物边缘依次输入的标记点,绘制相邻所述标记点之间的最短路径,形成初步轮廓。According to the marking points sequentially input by the operator along the edge of the remote sensing image, the shortest path between the adjacent marking points is drawn to form a preliminary outline. 2.根据权利要求1所述的方法,其特征在于,所述根据预处理的遥感图像构建总代价函数,包括:2. The method according to claim 1, wherein said constructing a total cost function according to the preprocessed remote sensing image comprises: 获取所述遥感图像的强边缘点值;Obtaining the strong edge point value of the remote sensing image; 计算所述遥感图像的像素点梯度幅值与像素点梯度方向代价;Calculate the pixel point gradient magnitude and pixel point gradient direction cost of the remote sensing image; 对所述强边缘点值、所述像素点梯度幅值与所述像素点梯度方向代价进行加权求和,形成所述总代价函数。A weighted summation is performed on the strong edge point value, the pixel point gradient magnitude and the pixel point gradient direction cost to form the total cost function. 3.根据权利要求2所述的方法,其特征在于,所述获取所述遥感图像的强边缘点值,包括:3. The method according to claim 2, wherein said obtaining the strong edge point value of said remote sensing image comprises: 对所述遥感图像进行地物边缘检测;performing feature edge detection on the remote sensing image; 对所述遥感图像进行灰度化处理,并根据所述遥感图像的灰度图的像素值确定强边缘点值;所述强边缘点值公式如下:Carry out grayscale processing to described remote sensing image, and determine strong edge point value according to the pixel value of the gray scale image of described remote sensing image; Described strong edge point value formula is as follows: 式中,I(p)为边缘检测与灰度化后所述遥感图像中地物边缘的像素点p的像素值,Z为强边缘点,fZ(p)为强边缘点值。In the formula, I(p) is the pixel value of the pixel point p on the edge of the object in the remote sensing image after edge detection and gray scale, Z is the strong edge point, and f Z (p) is the value of the strong edge point. 4.根据权利要求1所述的方法,其特征在于,所述绘制相邻所述标记点之间的最短路径,包括:4. The method according to claim 1, wherein said drawing the shortest path between adjacent said marked points comprises: 迭代计算相邻所述标记点之间的第一代价值,并将所述第一代价值最小的所述标记点作为父节点;Iteratively calculating the first-generation value between adjacent marked points, and using the marked point with the smallest first-generation value as a parent node; 遍历所述遥感图像的地物边缘上的所有所述父节点,并连接相邻的所述父节点得到所述标记点之间的最短路径。Traverse all the parent nodes on the edge of the feature in the remote sensing image, and connect the adjacent parent nodes to obtain the shortest path between the marked points. 5.根据权利要求4所述的方法,其特征在于,所述依次计算相邻所述标记点之间的第一代价值,包括:5. The method according to claim 4, wherein said sequentially calculating the first generation value between adjacent said marking points comprises: 遍历所述标记点,并将所述标记点加入节点队列;Traversing the marked points, and adding the marked points to the node queue; 依次将所述标记点作为起点,并将所述起点的初始代价值设为0;Taking the marked points as the starting point in turn, and setting the initial cost value of the starting point to 0; 遍历所述起点的邻域内的邻域节点,计算加入所述节点队列的所述邻域节点到所述起点的第一代价值;其中,若所述邻域节点在所述起点的对角线上,则给所述第一代价值乘以 Traversing the neighborhood nodes in the neighborhood of the starting point, calculating the first generation value of the neighborhood node added to the node queue to the starting point; wherein, if the neighborhood node is on the diagonal of the starting point , then multiply the first-generation value by 6.根据权利要求5所述的方法,其特征在于,所述将所述第一代价值最小的所述标记点作为父节点,包括:6. The method according to claim 5, wherein said using the mark point with the smallest value of the first generation as a parent node comprises: 若所述第一代价值与所述起点的初始代价之和小于所述邻域节点的代价值,则将所述第一代价值赋予所述邻域节点;If the sum of the first generation value and the initial cost of the starting point is less than the cost value of the neighborhood node, assign the first generation value to the neighborhood node; 将此时的所述起点定义为所述邻域节点的父节点,并将所述起点移出所述节点队列。The starting point at this time is defined as the parent node of the neighborhood node, and the starting point is removed from the node queue. 7.根据权利要求1所述的方法,其特征在于,所述形成初步轮廓,还包括:7. The method according to claim 1, wherein said forming a preliminary profile further comprises: 将所述初步轮廓转换为二值图;converting said preliminary profile into a binary image; 基于二值图对所述初步轮廓的外部轮廓进行寻找,获得所述外部轮廓的轮廓点集坐标;searching the outer contour of the preliminary contour based on the binary image, and obtaining the coordinates of the contour point set of the outer contour; 根据所述遥感图像的地理坐标信息将所述轮廓点集由像素坐标转为地理坐标并生成地理坐标文件;converting the contour point set from pixel coordinates to geographic coordinates according to the geographic coordinate information of the remote sensing image and generating a geographic coordinate file; 根据响应的人工操作对所述地理坐标文件进行修注直至所述初步轮廓满足精度要求。According to the corresponding manual operation, the geographic coordinate file is corrected until the preliminary outline meets the accuracy requirement. 8.一种遥感图像智能辅助标注装置,其特征在于,包括:8. An intelligent auxiliary labeling device for remote sensing images, characterized in that it comprises: 总代价函数模块,用于根据预处理的遥感图像构建总代价函数;The total cost function module is used to construct the total cost function according to the preprocessed remote sensing image; 连通加权图模块,用于将所述遥感图像的每个像素点作为连通加权图的节点,并根据所述总代价函数确定相邻像素点的加权边的代价值;其中,所述总代价函数被配置为使处于所述遥感图像的地物边缘上的像素点之间加权边的代价值小于预设代价值;The connected weighted graph module is used to use each pixel of the remote sensing image as a node of the connected weighted graph, and determine the cost value of the weighted edge of the adjacent pixel according to the total cost function; wherein, the total cost function It is configured to make the cost value of the weighted edge between the pixel points on the edge of the remote sensing image less than the preset cost value; 初步轮廓模块,用于根据操作人员沿所述遥感图像的地物边缘依次输入的标记点,绘制相邻所述标记点之间的最短路径,形成初步轮廓。The preliminary outline module is used to draw the shortest path between adjacent marked points according to the marked points sequentially input by the operator along the edge of the remote sensing image to form a preliminary outline. 9.一种用于执行遥感图像智能辅助标注方法的设备,其特征在于,包括:9. A device for performing an intelligent auxiliary labeling method for remote sensing images, characterized in that it comprises: 处理器;processor; 用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions; 所述处理器执行所述可执行指令时,实现如权利要求1至7中任意一项所述的方法。When the processor executes the executable instructions, the method according to any one of claims 1-7 is implemented. 10.一种非易失性计算机可读存储介质,其特征在于,包括用于存储计算机程序或指令,当该计算机程序或指令被执行时,使如权利要求1至7中任一项所述的方法被实现。10. A non-volatile computer-readable storage medium, characterized in that it includes a computer program or instruction for storing, and when the computer program or instruction is executed, the computer program or instruction according to any one of claims 1 to 7 method is implemented.
CN202310501840.5A 2023-05-06 2023-05-06 Intelligent auxiliary labeling method and device for remote sensing image Pending CN116524303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310501840.5A CN116524303A (en) 2023-05-06 2023-05-06 Intelligent auxiliary labeling method and device for remote sensing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310501840.5A CN116524303A (en) 2023-05-06 2023-05-06 Intelligent auxiliary labeling method and device for remote sensing image

Publications (1)

Publication Number Publication Date
CN116524303A true CN116524303A (en) 2023-08-01

Family

ID=87400709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310501840.5A Pending CN116524303A (en) 2023-05-06 2023-05-06 Intelligent auxiliary labeling method and device for remote sensing image

Country Status (1)

Country Link
CN (1) CN116524303A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119068076A (en) * 2024-04-25 2024-12-03 浙江凌迪数字科技有限公司 A method, device, electronic device, medium and product for generating a line graph

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070025620A1 (en) * 2005-07-29 2007-02-01 Ulrich Lauther Method for determining contours in images
US20110182517A1 (en) * 2010-01-20 2011-07-28 Duke University Segmentation and identification of layered structures in images
CN115239953A (en) * 2022-06-14 2022-10-25 武汉光庭信息技术股份有限公司 Street view image segmentation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070025620A1 (en) * 2005-07-29 2007-02-01 Ulrich Lauther Method for determining contours in images
US20110182517A1 (en) * 2010-01-20 2011-07-28 Duke University Segmentation and identification of layered structures in images
CN115239953A (en) * 2022-06-14 2022-10-25 武汉光庭信息技术股份有限公司 Street view image segmentation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119068076A (en) * 2024-04-25 2024-12-03 浙江凌迪数字科技有限公司 A method, device, electronic device, medium and product for generating a line graph

Similar Documents

Publication Publication Date Title
CN107633526B (en) Image tracking point acquisition method and device and storage medium
CN112966587A (en) Training method of target detection model, target detection method and related equipment
EP3635629A1 (en) Fine-grained image recognition
CN110956131B (en) Single target tracking method, device and system
CN113239928A (en) Method, apparatus and program product for image difference detection and model training
CN111709428A (en) Recognition method, device, electronic device and medium for key point position in image
CN113506368B (en) Map data fusion method, map data fusion device, electronic device, map data fusion medium, and program product
CN115631426A (en) Target detection method based on key point positioning in remote sensing image
CN110516528A (en) A kind of moving-target detection and tracking method based under movement background
WO2022134842A1 (en) Method and apparatus for identifying building features
CN116205889A (en) Offset detection method, offset detection device, electronic equipment and storage medium
CN115937319A (en) Key point labeling method, electronic equipment and storage medium based on X-ray image
CN118758289A (en) A 3D SLAM method based on moving target detection in dynamic scenes
CN116524303A (en) Intelligent auxiliary labeling method and device for remote sensing image
CN115482436B (en) Image screening model training method, device and image screening method
CN114511743B (en) Detection model training, target detection method, device, equipment, medium and product
CN114863129A (en) Instrument numerical analysis method, device, equipment and storage medium
CN117809092B (en) Medical image processing method and device, electronic equipment and storage medium
CN113780040B (en) Positioning method and device for lip key points, storage medium and electronic equipment
CN114119990A (en) Method, apparatus and computer program product for image feature point matching
CN114299109A (en) Multi-target object trajectory generation method, system, electronic device and storage medium
US10796435B2 (en) Image processing method and image processing apparatus
CN115272752B (en) Method, device, equipment and storage medium for training image classification model
Yang et al. Regularizing building outlines extracted from remote sensing images by integrating multiple algorithms
CN116205977A (en) Target identification positioning method and system based on 2D and 3D fusion

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