[go: up one dir, main page]

CN111553852B - Method and device for generating optical remote sensing image fast view - Google Patents

Method and device for generating optical remote sensing image fast view Download PDF

Info

Publication number
CN111553852B
CN111553852B CN202010286498.8A CN202010286498A CN111553852B CN 111553852 B CN111553852 B CN 111553852B CN 202010286498 A CN202010286498 A CN 202010286498A CN 111553852 B CN111553852 B CN 111553852B
Authority
CN
China
Prior art keywords
pixel
pixels
band
information
feature information
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
Application number
CN202010286498.8A
Other languages
Chinese (zh)
Other versions
CN111553852A (en
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.)
China Center for Resource Satellite Data and Applications CRESDA
Original Assignee
China Center for Resource Satellite Data and Applications CRESDA
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 China Center for Resource Satellite Data and Applications CRESDA filed Critical China Center for Resource Satellite Data and Applications CRESDA
Priority to CN202010286498.8A priority Critical patent/CN111553852B/en
Publication of CN111553852A publication Critical patent/CN111553852A/en
Application granted granted Critical
Publication of CN111553852B publication Critical patent/CN111553852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

本申请公开了一种光学遥感影像快视图的生成方法及装置,该方法包括:对待处理的光学遥感影像进行下重采样得到采样后的像元,并确定采样后的像元的特征信息;对所述特征信息进行线性拉伸,得到增强后的第一特征信息;根据所述第一特征信息计算所述每个波段中像元的特征参数,判断所述特征参数是否小于预设第一阈值;若小于,则对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,并根据所述第二特征信息生成快视图。本申请解决了现有技术生成的光学遥感影像快视图的适应性较差的技术问题。

This application discloses a method and device for generating a snapshot of an optical remote sensing image. The method includes: resampling the optical remote sensing image to be processed to obtain sampled pixels, and determining the characteristic information of the sampled pixels; The characteristic information is linearly stretched to obtain the enhanced first characteristic information; the characteristic parameters of the pixels in each band are calculated according to the first characteristic information, and it is judged whether the characteristic parameters are less than a preset first threshold ; If less than, perform gamma stretching on the first feature information to obtain enhanced second feature information, and generate a quick view based on the second feature information. This application solves the technical problem of poor adaptability of the optical remote sensing image snapshot generated by the existing technology.

Description

一种光学遥感影像快视图的生成方法及装置A method and device for generating a quick view of optical remote sensing images

技术领域Technical field

本申请涉及光学遥感技术领域,尤其涉及一种光学遥感影像快视图的生成方法及装置。The present application relates to the field of optical remote sensing technology, and in particular to a method and device for generating a snapshot of an optical remote sensing image.

背景技术Background technique

光学遥感影像快视图(或称为浏览图)的尺寸和数据量远小于该影像本身,一般快视图主要用于挑选影像,影像的快速分发和应急使用等。用户通过快视图可以初步识别影像覆盖区域和评估影像本身的质量和云量,进而实现对影像进行初步优选。为了便于用户通过快视图对影像进行初步优选,一般要求快视图具有地物清晰、反差适中以及易于判读等优点。一般光学遥感影像单波段像元值的量化位数普遍为10-12比特,也就是值域范围为0-1023/2047/4095,而遥感影像的快视图量化位数为8比特(0-255),因此,在生成光学遥感影像快视图的过程中,需要对光学遥感图像进行降位和增强处理。The size and data volume of optical remote sensing image snapshots (or browsing maps) are much smaller than the image itself. Generally, snapshots are mainly used for image selection, rapid distribution and emergency use of images. Through the quick view, users can initially identify the image coverage area and evaluate the quality and cloud cover of the image itself, thereby enabling preliminary optimization of images. In order to facilitate users to initially select images through the quick view, the quick view is generally required to have clear ground objects, moderate contrast, and easy interpretation. Generally, the number of quantization bits for single-band pixel values in optical remote sensing images is generally 10-12 bits, that is, the value range is 0-1023/2047/4095, while the number of quantization bits for fast view remote sensing images is 8 bits (0-255 ), therefore, in the process of generating a quick view of an optical remote sensing image, the optical remote sensing image needs to be downgraded and enhanced.

目前,在生成光学遥感影像快视图的过程中,往往采用单一的图像降位和增强算法,例如,单一的图像增强算法包括线性增强算法或伽马增强算法。由于光学遥感影像成像过程中地物、光照、天气条件各异,,。因此,现有技术生成的快视图中,特别是影像上有云、雪等高亮地物时,部分影像存在晴空区域过暗、过曝或色彩失真等情况,使得光学遥感影像快视图的质量不稳定,进而导致生成的光学遥感影像快视图的适用性较差。Currently, in the process of generating fast views of optical remote sensing images, a single image reduction and enhancement algorithm is often used. For example, a single image enhancement algorithm includes a linear enhancement algorithm or a gamma enhancement algorithm. Due to the different ground objects, lighting, and weather conditions during the optical remote sensing image imaging process,. Therefore, in the snapshots generated by the existing technology, especially when there are bright objects such as clouds and snow on the image, some images may have clear sky areas that are too dark, overexposed, or have color distortion, which affects the quality of the snapshots of optical remote sensing images. It is unstable, which leads to poor applicability of the generated optical remote sensing image snapshot.

发明内容Contents of the invention

本申请解决的技术问题是:针对现有技术生成的光学遥感影像快视图的适应性较差的问题,提供了一种光学遥感影像快视图的生成方法及装置,本申请实施例所提供的方案,通过对采样后的像元的特征信息进行线性拉伸,并根据线性拉伸后的像元特征信息实际情况对拉伸后的像元特征信息进行伽马增强拉伸,避免单一增强拉伸导致的光学遥感影像快视图的质量稳定,进而提高光学遥感影像快视图的适用性。The technical problem solved by this application is: Aiming at the problem of poor adaptability of optical remote sensing image snapshots generated by the existing technology, a method and device for generating optical remote sensing image snapshots are provided. The solution provided by the embodiments of this application , by linearly stretching the feature information of the sampled pixels, and performing gamma enhanced stretching on the stretched pixel feature information according to the actual situation of the linearly stretched pixel feature information, to avoid single enhanced stretching The resulting optical remote sensing image snapshot has stable quality, thereby improving the applicability of the optical remote sensing image snapshot.

第一方面,本申请实施例提供一种光学遥感影像快视图的生成方法,该方法包括:In a first aspect, embodiments of the present application provide a method for generating a snapshot of an optical remote sensing image. The method includes:

对待处理的光学遥感影像进行下重采样得到采样后的像元,并确定采样后的像元的特征信息;Resample the optical remote sensing image to be processed to obtain the sampled pixels, and determine the characteristic information of the sampled pixels;

对所述特征信息进行线性拉伸,得到增强后的第一特征信息;Linearly stretch the feature information to obtain enhanced first feature information;

根据所述第一特征信息计算所述每个波段中像元的特征参数,判断所述特征参数是否小于预设第一阈值;Calculate the characteristic parameters of the pixels in each band according to the first characteristic information, and determine whether the characteristic parameters are less than a preset first threshold;

若小于,则对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,并根据所述第二特征信息生成快视图。If it is less than, gamma stretching is performed on the first feature information to obtain enhanced second feature information, and a quick view is generated based on the second feature information.

本申请实施例所提供的方案中,通过对待处理的光学遥感影像进行采样,得到采样后的像元的特征信息,对特征信息进行线性拉伸,得到第一特征信息,并根据第一特征信息计算得到每个波段中像元的特征参数,若特征参数小于预设第一阈值,则对第一特征信息进行伽马拉伸,得到增强后的第二特征信息,根据第二特征信息生成快视图。因此,本申请实施例所提供的方案,通过对采样后的像元的特征信息进行线性拉伸,并根据线性拉伸后的像元特征信息实际情况对拉伸后的像元特征信息进行伽马增强拉伸,避免单一增强拉伸导致的光学遥感影像快视图的质量稳定,进而提高光学遥感影像快视图的适用性。In the solution provided by the embodiment of the present application, the characteristic information of the sampled pixels is obtained by sampling the optical remote sensing image to be processed, linearly stretching the characteristic information to obtain the first characteristic information, and based on the first characteristic information The characteristic parameters of the pixels in each band are calculated. If the characteristic parameters are less than the preset first threshold, the first characteristic information is gamma stretched to obtain the enhanced second characteristic information, and a quick response is generated based on the second characteristic information. view. Therefore, the solution provided by the embodiments of the present application linearly stretches the feature information of the sampled pixels, and performs gamma on the stretched pixel feature information according to the actual situation of the linearly stretched pixel feature information. Horse enhanced stretching avoids the stable quality of optical remote sensing image quick views caused by single enhanced stretching, thereby improving the applicability of optical remote sensing image quick views.

可选地,对待处理的光学遥感影像进行下重采样得到采样后的像元,包括:Optionally, resample the optical remote sensing image to be processed to obtain sampled pixels, including:

确定所述待处理的光学遥感影像的波段信息以及尺寸信息,根据所述波段信息确定出生成快视图的至少一个波段;Determine the band information and size information of the optical remote sensing image to be processed, and determine at least one band for generating a quick view based on the band information;

提取所述至少一个波段的像元,根据所述尺寸信息确定采样比例,并根据所述采样比例对所述至少一个波段的像元进行下重采样得到所述采样后的像元。The pixels of the at least one band are extracted, a sampling ratio is determined based on the size information, and the pixels of the at least one band are down-sampled according to the sampling ratio to obtain the sampled pixels.

可选地,根据所述波段信息确定至少一个波段,包括:Optionally, determining at least one band based on the band information includes:

若所述波段信息为全色波段,则所述至少一个波段为所述全色波段;或若所述波段信息为多波段,则所述至少一个波段为红、绿、蓝三个波段。If the band information is a panchromatic band, the at least one band is the panchromatic band; or if the band information is multiple bands, the at least one band is red, green, and blue.

可选地,根据所述尺寸信息确定采样比例,包括:Optionally, determining the sampling ratio based on the size information includes:

根据如下公式确定采样比例:Determine the sampling ratio according to the following formula:

其中,n表示所述待处理的光学遥感影像的像元的个数;imgh表示所述待处理的光学遥感影像的像元的行数;imgw表示所述待处理的光学遥感影像的像元的行数。Where, n represents the number of pixels of the optical remote sensing image to be processed; imgh represents the number of rows of pixels of the optical remote sensing image to be processed; imgw represents the number of pixels of the optical remote sensing image to be processed. Rows.

可选地,对所述特征信息进行线性拉伸,包括:Optionally, perform linear stretching on the feature information, including:

根据所述特征信息计算所述至少一个波段的累积直方图,确定所述累积直方图中2%处像元的灰度值以及99%处像元的灰度值;Calculate a cumulative histogram of the at least one band according to the characteristic information, and determine the gray value of the pixels at 2% and the gray value of the pixels at 99% of the cumulative histogram;

根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸。The feature information is linearly stretched according to the gray value of the pixel at 2% and the gray value of the pixel at 99%.

可选地,根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸,包括:Optionally, linearly stretching the feature information according to the gray value of the pixel at 2% and the gray value of the pixel at 99% includes:

根据如下公式对所述特征信息进行线性拉伸:The feature information is linearly stretched according to the following formula:

其中,g(x,y)表示拉伸后影像中(x,y)处的特征信息;f(x,y)表示拉伸前影像中(x,y)处的特征信息;min表示2%处像元的灰度值;max表示99%处像元的灰度值。Among them, g(x, y) represents the characteristic information at (x, y) in the image after stretching; f(x, y) represents the characteristic information at (x, y) in the image before stretching; min represents 2% The gray value of the pixel at 99%; max represents the gray value of the pixel at 99%.

可选地,根据所述第一特征信息计算所述每个波段中像元的特征参数,包括:Optionally, calculating the characteristic parameters of the pixels in each band according to the first characteristic information includes:

根据所述第一特征信息确定像元的个数,每个像元的像元值,以及中位数,其中,所述中位数是指累积直方图中50%处像元的像元值;The number of pixels, the pixel value of each pixel, and the median are determined according to the first feature information, where the median refers to the pixel value of 50% of the pixels in the cumulative histogram. ;

根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值;Calculate the pixel mean value of each pixel according to the number of the pixels and the pixel value of each pixel;

根据所述每个像元的像元均值计算得到所述每个像元的像元均方差。The pixel mean square error of each pixel is calculated based on the pixel mean value of each pixel.

可选地,对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,包括:Optionally, perform gamma stretching on the first feature information to obtain enhanced second feature information, including:

根据如下公式对所述第一特征信息进行伽马拉伸:The first feature information is gamma stretched according to the following formula:

其中,γ表示伽马拉伸系数,medianv表示中位数,t1、t2表示预设第二阈值;h(x,y)表示(x,y)处像元的第二特征信息。Among them, γ represents the gamma stretching coefficient, medianv represents the median, t 1 and t 2 represent the preset second threshold; h(x, y) represents the second feature information of the pixel at (x, y).

本申请实施例所提供的方案中,若线性拉伸后的像元的特征参数小于预设第一阈值时,通过光学遥感影像实际的信息自适应的确定伽马拉伸的系数,并根据伽马拉伸系数对像元的特征信息进行伽马拉伸。因此,本申请实施例所提供的方案中,通过光学遥感影像实际的信息自适应的确定伽马拉伸的系数,避免拉伸过程中出现过暗或过曝情况,保证了快视图色彩真实,提高了快视图的质量。In the solution provided by the embodiment of the present application, if the characteristic parameter of the linearly stretched pixel is less than the preset first threshold, the gamma stretching coefficient is adaptively determined through the actual information of the optical remote sensing image, and the gamma stretching coefficient is determined according to the gamma The gamma stretching coefficient performs gamma stretching on the feature information of the pixel. Therefore, in the solution provided by the embodiment of the present application, the actual information of the optical remote sensing image is used to adaptively determine the coefficient of gamma stretching, avoiding over-darkness or over-exposure during the stretching process, and ensuring the true color of the quick view. Improved the quality of quick views.

可选地,对所述特征信息进行线性拉伸之前,还包括:Optionally, before linearly stretching the feature information, it also includes:

根据所述特征信息计算所述每个波段的大气层顶的反射率,并根据所述反射率对所述特征信息进行预处理。The reflectivity of the top of the atmosphere of each band is calculated according to the characteristic information, and the characteristic information is preprocessed according to the reflectivity.

第二方面,本申请实施例提供了一种光学遥感影像快视图的生成装置,该装置包括:In a second aspect, embodiments of the present application provide a device for generating a snapshot of an optical remote sensing image, which device includes:

采样单元,用于对待处理的光学遥感影像进行下重采样得到采样后的像元,并确定采样后的像元的特征信息;The sampling unit is used to resample the optical remote sensing image to be processed to obtain sampled pixels, and determine the characteristic information of the sampled pixels;

拉伸单元,用于对所述特征信息进行线性拉伸,得到增强后的第一特征信息;A stretching unit, used to linearly stretch the feature information to obtain enhanced first feature information;

判断单元,用于根据所述第一特征信息计算所述每个波段中像元的特征参数,判断所述特征参数是否小于预设第一阈值;A judging unit, configured to calculate the characteristic parameters of the pixels in each band according to the first characteristic information, and judge whether the characteristic parameters are less than a preset first threshold;

生成单元,若小于预设第一阈值,则对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,并根据所述第二特征信息生成快视图。The generation unit, if less than the preset first threshold, performs gamma stretching on the first feature information to obtain enhanced second feature information, and generates a quick view based on the second feature information.

可选地,所述采样单元,具体用于:Optionally, the sampling unit is specifically used for:

确定所述待处理的光学遥感影像的波段信息以及尺寸信息,根据所述波段信息确定出生成快视图的至少一个波段;Determine the band information and size information of the optical remote sensing image to be processed, and determine at least one band for generating a quick view based on the band information;

提取所述至少一个波段的像元,根据所述尺寸信息确定采样比例,并根据所述采样比例对所述至少一个波段的像元进行下重采样得到所述采样后的像元。The pixels of the at least one band are extracted, a sampling ratio is determined based on the size information, and the pixels of the at least one band are down-sampled according to the sampling ratio to obtain the sampled pixels.

可选地,所述采样单元,具体用于:Optionally, the sampling unit is specifically used for:

若所述波段信息为全色波段,则所述至少一个波段为所述全色波段;或若所述波段信息为多波段,则所述至少一个波段为红、绿、蓝三个波段。If the band information is a panchromatic band, the at least one band is the panchromatic band; or if the band information is multiple bands, the at least one band is red, green, and blue.

可选地,所述采样单元,具体用于:根据如下公式确定采样比例:Optionally, the sampling unit is specifically used to determine the sampling ratio according to the following formula:

其中,n表示所述待处理的光学遥感影像的像元的个数;imgh表示所述待处理的光学遥感影像的像元的行数;imgw表示所述待处理的光学遥感影像的像元的行数。Where, n represents the number of pixels of the optical remote sensing image to be processed; imgh represents the number of rows of pixels of the optical remote sensing image to be processed; imgw represents the number of pixels of the optical remote sensing image to be processed. Rows.

可选地,所述拉伸单元,具体用于:Optionally, the stretching unit is specifically used for:

根据所述特征信息计算所述至少一个波段的累积直方图,确定所述累积直方图中2%处像元的灰度值以及99%处像元的灰度值;Calculate a cumulative histogram of the at least one band according to the characteristic information, and determine the gray value of the pixels at 2% and the gray value of the pixels at 99% of the cumulative histogram;

根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸。The feature information is linearly stretched according to the gray value of the pixel at 2% and the gray value of the pixel at 99%.

可选地,所述拉伸单元,具体用于:根据如下公式对所述特征信息进行线性拉伸:Optionally, the stretching unit is specifically used to linearly stretch the feature information according to the following formula:

其中,g(x,y)表示拉伸后影像中(x,y)处的特征信息;f(x,y)表示拉伸前影像中(x,y)处的特征信息;min表示2%处像元的灰度值;max表示99%处像元的灰度值。Among them, g(x, y) represents the characteristic information at (x, y) in the image after stretching; f(x, y) represents the characteristic information at (x, y) in the image before stretching; min represents 2% The gray value of the pixel at 99%; max represents the gray value of the pixel at 99%.

可选地,所述判断单元,具体用于:Optionally, the judgment unit is specifically used for:

根据所述第一特征信息确定像元的个数,每个像元的像元值,以及中位数,其中,所述中位数是指累积直方图中50%处像元的像元值;The number of pixels, the pixel value of each pixel, and the median are determined according to the first feature information, where the median refers to the pixel value of 50% of the pixels in the cumulative histogram. ;

根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值;Calculate the pixel mean value of each pixel according to the number of the pixels and the pixel value of each pixel;

根据所述每个像元的像元均值计算得到所述每个像元的像元均方差。The pixel mean square error of each pixel is calculated based on the pixel mean value of each pixel.

可选地,所述生成单元,具体用于:根据如下公式对所述第一特征信息进行伽马拉伸:Optionally, the generating unit is specifically configured to perform gamma stretching on the first feature information according to the following formula:

其中,γ表示伽马拉伸系数,medianv表示中位数,t1、t2表示预设第二阈值;h(x,y)表示(x,y)处像元的第二特征信息。Among them, γ represents the gamma stretching coefficient, medianv represents the median, t 1 and t 2 represent the preset second threshold; h(x, y) represents the second feature information of the pixel at (x, y).

可选地,所述装置还包括计算单元;所述计算单元,具体用于:Optionally, the device further includes a computing unit; the computing unit is specifically used for:

根据所述特征信息计算所述每个波段的大气层顶的反射率,并根据所述反射率对所述特征信息进行预处理。The reflectivity of the top of the atmosphere of each band is calculated according to the characteristic information, and the characteristic information is preprocessed according to the reflectivity.

第三方面,本申请提供一种计算机设备,该计算机设备,包括:In a third aspect, this application provides a computer device, which includes:

存储器,用于存储至少一个处理器所执行的指令;memory for storing instructions executed by at least one processor;

处理器,用于执行存储器中存储的指令执行第一方面所述的方法。A processor, configured to execute instructions stored in the memory to perform the method described in the first aspect.

第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行第一方面所述的方法。In a fourth aspect, the present application provides a computer-readable storage medium that stores computer instructions. When the computer instructions are run on a computer, they cause the computer to execute the method described in the first aspect.

附图说明Description of the drawings

图1为本申请实施例所提供的一种光学遥感影像快视图的生成方法的流程示意图;Figure 1 is a schematic flowchart of a method for generating a snapshot of an optical remote sensing image provided by an embodiment of the present application;

图2为本申请实施例所提供的一种光学遥感影像快视图的生成装置的结构示意图;Figure 2 is a schematic structural diagram of a device for generating a snapshot of an optical remote sensing image provided by an embodiment of the present application;

图3为本申请实施例所提供的一种光学遥感影像快视图的生成装置的结构示意图;Figure 3 is a schematic structural diagram of a device for generating a snapshot of an optical remote sensing image provided by an embodiment of the present application;

图4为本申请实施例所提供的一种计算机设备的结构示意图。FIG. 4 is a schematic structural diagram of a computer device provided by an embodiment of the present application.

具体实施方式Detailed ways

为了更好的理解上述技术方案,下面通过附图以及具体实施例对本申请技术方案做详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本申请技术方案的详细的说明,而不是对本申请技术方案的限定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互组合。In order to better understand the above technical solution, the technical solution of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are a detailed description of the technical solution of the present application, and This is not intended to limit the technical solution of the present application. If there is no conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

以下结合说明书附图对本申请实施例所提供的一种光学遥感影像快视图的生成方法做进一步详细的说明,该方法具体实现方式可以包括以下步骤(方法流程如图1所示):The following is a further detailed description of a method for generating a snapshot of an optical remote sensing image provided by the embodiment of the present application in conjunction with the accompanying drawings. The specific implementation of the method may include the following steps (the method flow is shown in Figure 1):

步骤101,对待处理的光学遥感影像进行下重采样得到采样后的像元,并确定采样后的像元的特征信息。Step 101: Resample the optical remote sensing image to be processed to obtain sampled pixels, and determine the characteristic information of the sampled pixels.

具体的,在本申请实施例所提供的方案中,光学遥感相机获取待处理的光学遥感影像,计算机设备将获取的所述待处理的光学遥感影像进行下重采样。具体的,计算机设备对待处理的光学遥感影像进行下重采样的方式有多种,下面以一种较佳的方式为例进行说明。Specifically, in the solution provided by the embodiment of the present application, the optical remote sensing camera acquires the optical remote sensing image to be processed, and the computer device performs down-sampling on the acquired optical remote sensing image to be processed. Specifically, there are many ways for computer equipment to down-sample optical remote sensing images to be processed. A preferred method will be described below as an example.

在一种可能的实现方式中,对待处理的光学遥感影像进行下重采样得到采样后的像元,包括:确定所述待处理的光学遥感影像的波段信息以及尺寸信息,根据所述波段信息确定出生成快视图的至少一个波段;提取所述至少一个波段的像元,根据所述尺寸信息确定采样比例,并根据所述采样比例对所述至少一个波段的像元进行下重采样得到所述采样后的像元。In a possible implementation, resampling the optical remote sensing image to be processed to obtain sampled pixels includes: determining the band information and size information of the optical remote sensing image to be processed, and determining based on the band information generate at least one band of the fast view; extract the pixels of the at least one band, determine the sampling ratio according to the size information, and down-sample the pixels of the at least one band according to the sampling ratio to obtain the The sampled pixel.

在本申请实施例所提供的方案中,待处理的光学遥感影像的波段信息包括全色波段或多波段,其中,全色波段一般是指0.5微米到0.7微米左右的单波段,即从绿色往后的可见光波段。由于光学遥感影像的波段信息有多种,对于不同波段信息计算机设备所确定的至少一个波段不同。下面分别对不同的波段信息所确定的至少一个波段进行说明。In the solution provided by the embodiment of this application, the band information of the optical remote sensing image to be processed includes a panchromatic band or multiple bands, where the panchromatic band generally refers to a single band of about 0.5 microns to 0.7 microns, that is, from green to the visible light band. Since there are multiple waveband information of optical remote sensing images, at least one waveband determined by the computer equipment for different waveband information is different. At least one band determined by different band information will be described below respectively.

在一种可能实现的方式中,根据所述波段信息确定至少一个波段,包括:若所述波段信息为全色波段,则所述至少一个波段为所述全色波段;或若所述波段信息为多波段,则所述至少一个波段为红、绿、蓝三个波段。In a possible implementation manner, determining at least one band based on the band information includes: if the band information is a panchromatic band, then the at least one band is the panchromatic band; or if the band information If it is multi-band, the at least one band is red, green and blue.

进一步,在本申请实施例所提供的方案中,待处理的光学遥感图像的尺寸信息包括待处理的光学遥感影像中像元的行、列数以及像元的个数。计算机设备在确定出生成快视图的至少一个波段后,提取至少一个波段的特征信息,例如,特征信息包括像元的像元值以及像元的位置信息等。计算机设备根据光学遥感影像的尺寸信息对至少一个波段的特征信息进行下重采样处理,具体的,计算机设备对至少一个波段的特征信息进行下重采样的方式有多种,下面以一种较佳的方式为例进行说明。Further, in the solution provided by the embodiment of the present application, the size information of the optical remote sensing image to be processed includes the number of rows and columns of pixels and the number of pixels in the optical remote sensing image to be processed. After determining at least one band for generating the snapshot view, the computer device extracts feature information of at least one band. For example, the feature information includes the pixel value of the pixel and the position information of the pixel. The computer equipment performs down-resampling processing on the characteristic information of at least one band according to the size information of the optical remote sensing image. Specifically, there are many ways for the computer equipment to down-resample the characteristic information of at least one band. The following is a preferred method. The method is explained as an example.

在一种可能实现方式中,根据所述尺寸信息确定采样比例,包括:In a possible implementation, determining the sampling ratio based on the size information includes:

根据如下公式确定采样比例:Determine the sampling ratio according to the following formula:

其中,n表示所述待处理的光学遥感影像的像元的个数;imgh表示所述待处理的光学遥感影像的像元的行数;imgw表示所述待处理的光学遥感影像的像元的行数。Where, n represents the number of pixels of the optical remote sensing image to be processed; imgh represents the number of rows of pixels of the optical remote sensing image to be processed; imgw represents the number of pixels of the optical remote sensing image to be processed. Rows.

步骤102,对所述特征信息进行线性拉伸,得到增强后的第一特征信息。Step 102: Linearly stretch the feature information to obtain enhanced first feature information.

在本申请实施例所提供的方案中,计算机设备在确定每个波段特征信息之后,对所述特征信息进行线性拉伸,得到增强后的第一特征信息。具体的,计算机设备对所述特征信息进行线性拉伸的方式有多种,下面以一种较佳的方式为例进行说明。In the solution provided by the embodiment of the present application, after determining the characteristic information of each band, the computer device linearly stretches the characteristic information to obtain enhanced first characteristic information. Specifically, there are many ways for a computer device to linearly stretch the feature information. A preferred way will be described below as an example.

在一种可能实现方式中,对所述特征信息进行线性拉伸,包括:根据所述特征信息计算所述至少一个波段的累积直方图,确定所述累积直方图中2%处像元的灰度值以及99%处像元的灰度值;根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸。In one possible implementation, linearly stretching the feature information includes: calculating a cumulative histogram of the at least one band according to the feature information, and determining the gray value of 2% of the pixels in the cumulative histogram. degree value and the gray value of the pixel at 99%; the feature information is linearly stretched according to the gray value of the pixel at 2% and the gray value of the pixel at 99%.

在本申请实施例所提供的方案中,根据所述特征信息确定每个像元的灰度值以及采样后的像元的个数,根据像元的灰度值从小到大的顺序将采样后的像元进行排序得到累积直方图,然后,根据采样后的像元的个数确定累积直方图中2%处像元的灰度值以及99%处像元的灰度值,例如,若累积直方图中像元的个数为100个,则2%处像元是指累积直方图中第二个像元,99%处像元是指累积直方图中第99个像元,再根据2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸。具体的,计算机设备根据2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸的方式有多种,下面以一种较佳的方式为例进行说明。In the solution provided by the embodiment of the present application, the gray value of each pixel and the number of sampled pixels are determined based on the characteristic information, and the sampled pixels are sequenced from small to large according to the gray value of the pixel. Sort the pixels to obtain the cumulative histogram, and then determine the gray value of the pixels at 2% and the gray value of the pixels at 99% of the cumulative histogram according to the number of sampled pixels. For example, if the cumulative The number of pixels in the histogram is 100, then the pixel at 2% refers to the second pixel in the cumulative histogram, and the pixel at 99% refers to the 99th pixel in the cumulative histogram, and then based on 2 The gray value of the pixel at % and the gray value of the pixel at 99% linearly stretch the feature information. Specifically, there are many ways for the computer device to linearly stretch the feature information based on the gray value of the pixels at 2% and the gray value of the pixels at 99%. The following is a better way. Take an example to illustrate.

在一种可能实现方式中,根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸,包括:In one possible implementation, the feature information is linearly stretched according to the gray value of the pixels at 2% and the gray value of the pixels at 99%, including:

根据如下公式对所述特征信息进行线性拉伸:The feature information is linearly stretched according to the following formula:

其中,g(x,y)表示拉伸后影像中(x,y)处的特征信息;f(x,y)表示拉伸前影像中(x,y)处的特征信息;min表示2%处像元的灰度值;max表示99%处像元的灰度值。Among them, g(x, y) represents the characteristic information at (x, y) in the image after stretching; f(x, y) represents the characteristic information at (x, y) in the image before stretching; min represents 2% The gray value of the pixel at 99%; max represents the gray value of the pixel at 99%.

根据上述公式可知,计算机设备在对采样后的像元的特征信息进行拉伸,具体过程如下:将累积图像直方图中前2%以及后1%的像元点裁减掉,然后对累积直方图中2%-99%范围内的像元点的像素值(浮点值0-1范围),进行0-255范围内的线性拉伸。According to the above formula, it can be seen that the computer equipment is stretching the characteristic information of the sampled pixels. The specific process is as follows: cut out the first 2% and the last 1% of the pixel points in the cumulative image histogram, and then trim the cumulative histogram. The pixel value of the pixel point in the range of 2%-99% (floating point value range of 0-1) is linearly stretched in the range of 0-255.

步骤103,根据所述第一特征信息计算所述每个波段中像元的特征参数,判断所述特征参数是否小于预设第一阈值。Step 103: Calculate the characteristic parameters of the pixels in each band according to the first characteristic information, and determine whether the characteristic parameters are less than a preset first threshold.

在本申请实施例所提供的方案中,计算机设备在确定出拉伸后的第一特征信息之后,根据第一特征信息计算每个波段中像元的特征参数,其中,特征参数包括中位数、每个像元的像元均值以及均方差。具体的,计算机设备根据第一特征信息计算每个波段中像元的特征参数的方式有多种,下面以一种较佳的方式为例进行说明。In the solution provided by the embodiment of the present application, after determining the stretched first characteristic information, the computer device calculates the characteristic parameters of the pixels in each band according to the first characteristic information, where the characteristic parameters include the median , the pixel mean and mean square error of each pixel. Specifically, there are many ways for the computer device to calculate the characteristic parameters of the pixels in each band based on the first characteristic information. A preferred method is used as an example for description below.

在一种可能实现方式中,根据所述第一特征信息计算所述每个波段中像元的特征参数,包括:根据所述第一特征信息确定像元的个数,每个像元的像元值,以及中位数,其中,所述中位数是指累积直方图中50%处像元的像元值;根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值;根据所述每个像元的像元均值计算得到所述每个像元的像元均方差。In one possible implementation, calculating the characteristic parameters of the pixels in each band according to the first characteristic information includes: determining the number of pixels according to the first characteristic information, and the image of each pixel. element value, and the median, wherein the median refers to the pixel value of 50% of the pixels in the cumulative histogram; according to the number of the pixels and the pixel value of each pixel The pixel mean value of each pixel is calculated and obtained; and the pixel mean square error of each pixel is calculated according to the pixel mean value of each pixel.

具体的,在本申请实施例所提供的方案中,根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值,包括:根据如下公式计算所述每个像元的像元均值:Specifically, in the solution provided by the embodiment of the present application, calculating the pixel mean value of each pixel according to the number of the pixels and the pixel value of each pixel includes: according to the following The formula calculates the cell mean for each cell:

其中,μ表示所述每个波段像元均值;m(x,y)表示(x,y)处像元的像元值;p表示所述像元的个数。Among them, μ represents the mean value of the pixels in each band; m(x, y) represents the pixel value of the pixel at (x, y); p represents the number of the pixels.

根据所述每个像元的像元均值计算得到所述每个像元的像元均方差,包括:根据如下公式计算所述每个像元的像元均方差:Calculating the pixel mean square error of each pixel based on the pixel mean value of each pixel includes: calculating the pixel mean square error of each pixel according to the following formula:

其中,σ表示所述每个像元的像元均方差。Among them, σ represents the pixel mean square error of each pixel.

进一步,在本申请实施例所提供的方案中,数据库中预先存储着中位数、像元均值或者像元标准方差的阈值,例如,像元均值与像元标准方差之和的阈值为128,中位数的阈值为70。计算机设备在计算出累积直方图的中位数、像元均值或者像元标准方差之后,判断中位数或像元均值与像元标准方差之和是否小于预设阈值。Furthermore, in the solution provided by the embodiment of the present application, the threshold value of the median, pixel mean value or pixel standard deviation is pre-stored in the database. For example, the threshold value of the sum of the pixel mean value and the pixel standard deviation is 128, The threshold for the median is 70. After calculating the median, pixel mean, or pixel standard deviation of the cumulative histogram, the computer device determines whether the sum of the median or pixel mean and the pixel standard deviation is less than a preset threshold.

步骤104,若小于,则对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,并根据所述第二特征信息生成快视图。Step 104: If it is less than, gamma stretch is performed on the first feature information to obtain enhanced second feature information, and a quick view is generated based on the second feature information.

在本申请实施例所提供的方案中,若计算机设备确定每个波段中像元的特征参数小于预设阈值,则对第一特征信息进行伽马拉伸,得到增强后的第二特征信息。具体的,计算机设备对第一特征信息进行伽马拉伸的方式有多种,下面以一种较佳的方式为例进行说明。In the solution provided by the embodiment of the present application, if the computer device determines that the characteristic parameter of the pixel in each band is less than the preset threshold, it performs gamma stretching on the first characteristic information to obtain the enhanced second characteristic information. Specifically, there are many ways for computer equipment to perform gamma stretching on the first feature information. A preferred method will be described below as an example.

在一种可能实现方式中,对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,包括:根据如下公式对所述第一特征信息进行伽马拉伸:In one possible implementation, performing gamma stretching on the first feature information to obtain enhanced second feature information includes: performing gamma stretching on the first feature information according to the following formula:

其中,γ表示伽马拉伸系数,medianv表示中位数,t1、t2表示预设第二阈值;h(x,y)表示(x,y)处像元的第二特征信息。Among them, γ represents the gamma stretching coefficient, medianv represents the median, t 1 and t 2 represent the preset second threshold; h(x, y) represents the second feature information of the pixel at (x, y).

进一步,在本申请实施例所提供的方案中,在步骤104之前,所述方法还包括步骤105,若像元的特征参数大于预设第一阈值,则根据第一特征信息生成所述快视图。Further, in the solution provided by the embodiment of the present application, before step 104, the method also includes step 105. If the characteristic parameter of the pixel is greater than the preset first threshold, the snapshot view is generated according to the first characteristic information. .

进一步,为了减小快视图中图像色彩失真。在本申请实施例所提供的方案中,对所述特征信息进行线性拉伸之前,还包括:根据所述特征信息计算所述每个波段的大气层顶的反射率,并根据所述反射率对所述特征信息进行预处理。Further, in order to reduce the color distortion of the image in the quick view. In the solution provided by the embodiment of the present application, before linearly stretching the characteristic information, the method further includes: calculating the reflectivity of the top of the atmosphere in each band according to the characteristic information, and calculating the reflectivity according to the reflectance. The feature information is preprocessed.

具体的,在本申请实施例所提供的方案中,计算机设备在确定每个波段的特征信息之后,根据所述特征信息确定采样后的每个像元的灰度值,然后,根据预设的辐射定标系数参数将每个波段像元的灰度值转换为辐射亮度(单位为:W.m-1.sr-1.μm-1),例如,辐射定标系数参数包括辐射定标系数增益、偏移量等。具体的,通过如下公式将灰度值转换为辐射亮度:Specifically, in the solution provided by the embodiment of the present application, after determining the characteristic information of each band, the computer device determines the gray value of each sampled pixel based on the characteristic information, and then, according to the preset The radiation calibration coefficient parameters convert the gray value of each band pixel into radiance brightness (unit: Wm -1 .sr -1 .μm -1 ). For example, the radiation calibration coefficient parameters include radiation calibration coefficient gain, Offset etc. Specifically, the gray value is converted into radiance through the following formula:

L=Gain×DN+BisaL=Gain×DN+Bisa

其中,L表示每个像元的辐射亮度;Gain表示辐射定标系数增益;DN表示采样后的像元的灰度值;Bisa表示辐射定标系数偏移量。Among them, L represents the radiance of each pixel; Gain represents the radiation calibration coefficient gain; DN represents the gray value of the sampled pixel; Bisa represents the radiation calibration coefficient offset.

进一步,计算机设备在计算出每个像元的辐射亮度之后,通过如下公式计算每个波段的大气层顶的反射率:Furthermore, after calculating the radiance of each pixel, the computer equipment calculates the reflectivity of the top of the atmosphere in each band through the following formula:

其中,B表示每个波段的大气层顶的反射率;D表示日地距离;ESUN表示大气层顶的平均太阳光谱辐射照度(单位为W.m-2.sr-1.μm-1);θ表示太阳的天顶角。Among them, B represents the reflectivity of the top of the atmosphere in each band; D represents the distance between the sun and the earth; ESUN represents the average solar spectral irradiance at the top of the atmosphere (unit is Wm -2 .sr -1 .μm -1 ); θ represents the sun’s Zenith angle.

本申请实施例所提供的方案中,通过对待处理的光学遥感影像进行采样,得到采样后的像元的特征信息,对特征信息进行线性拉伸,得到第一特征信息,并根据第一特征信息计算得到每个波段中像元的特征参数,若特征参数小于预设第一阈值,则对第一特征信息进行伽马拉伸,得到增强后的第二特征信息,根据第二特征信息生成快视图。因此,本申请实施例所提供的方案,通过对采样后的像元的特征信息进行线性拉伸,并根据线性拉伸后的像元特征信息实际情况对拉伸后的像元特征信息进行伽马增强拉伸,避免单一增强拉伸导致的光学遥感影像快视图的质量稳定,进而提高光学遥感影像快视图的适用性。In the solution provided by the embodiment of the present application, the characteristic information of the sampled pixels is obtained by sampling the optical remote sensing image to be processed, linearly stretching the characteristic information to obtain the first characteristic information, and based on the first characteristic information The characteristic parameters of the pixels in each band are calculated. If the characteristic parameters are less than the preset first threshold, the first characteristic information is gamma stretched to obtain the enhanced second characteristic information, and a quick response is generated based on the second characteristic information. view. Therefore, the solution provided by the embodiments of the present application linearly stretches the feature information of the sampled pixels, and performs gamma on the stretched pixel feature information according to the actual situation of the linearly stretched pixel feature information. Horse enhanced stretching avoids the stable quality of optical remote sensing image quick views caused by single enhanced stretching, thereby improving the applicability of optical remote sensing image quick views.

基于与图1所示的方法相同的发明构思,本申请实施例提供了一种光学遥感影像快视图的生成装置,参见图2,该装置包括:Based on the same inventive concept as the method shown in Figure 1, embodiments of the present application provide a device for generating a snapshot of an optical remote sensing image. See Figure 2. The device includes:

采样单元201,用于对待处理的光学遥感影像进行下重采样得到采样后的像元,并确定采样后的像元的特征信息;The sampling unit 201 is used to resample the optical remote sensing image to be processed to obtain sampled pixels, and determine the characteristic information of the sampled pixels;

拉伸单元202,用于对所述特征信息进行线性拉伸,得到增强后的第一特征信息;The stretching unit 202 is used to linearly stretch the feature information to obtain enhanced first feature information;

判断单元203,用于根据所述第一特征信息计算所述每个波段中像元的特征参数,判断所述特征参数是否小于预设第一阈值;The judging unit 203 is configured to calculate the characteristic parameters of the pixels in each band according to the first characteristic information, and judge whether the characteristic parameters are less than a preset first threshold;

生成单元204,若小于预设第一阈值,则对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,并根据所述第二特征信息生成快视图。If the value is less than the preset first threshold, the generation unit 204 performs gamma stretching on the first feature information to obtain enhanced second feature information, and generates a snapshot based on the second feature information.

可选地,所述采样单元201,具体用于:Optionally, the sampling unit 201 is specifically used for:

确定所述待处理的光学遥感影像的波段信息以及尺寸信息,根据所述波段信息确定出生成快视图的至少一个波段;Determine the band information and size information of the optical remote sensing image to be processed, and determine at least one band for generating a quick view based on the band information;

提取所述至少一个波段的像元,根据所述尺寸信息确定采样比例,并根据所述采样比例对所述至少一个波段的像元进行下重采样得到所述采样后的像元。The pixels of the at least one band are extracted, a sampling ratio is determined based on the size information, and the pixels of the at least one band are down-sampled according to the sampling ratio to obtain the sampled pixels.

可选地,所述采样单元201,具体用于:Optionally, the sampling unit 201 is specifically used for:

若所述波段信息为全色波段,则所述至少一个波段为所述全色波段;或若所述波段信息为多波段,则所述至少一个波段为红、绿、蓝三个波段。If the band information is a panchromatic band, the at least one band is the panchromatic band; or if the band information is multiple bands, the at least one band is red, green, and blue.

可选地,所述采样单元201,具体用于:根据如下公式确定采样比例:Optionally, the sampling unit 201 is specifically used to determine the sampling ratio according to the following formula:

其中,n表示所述待处理的光学遥感影像的像元的个数;imgh表示所述待处理的光学遥感影像的像元的行数;mgw表示所述待处理的光学遥感影像的像元的行数。Where, n represents the number of pixels of the optical remote sensing image to be processed; imgh represents the number of rows of pixels of the optical remote sensing image to be processed; mgw represents the number of pixels of the optical remote sensing image to be processed. Rows.

可选地,所述拉伸单元202,具体用于:Optionally, the stretching unit 202 is specifically used for:

根据所述特征信息计算所述至少一个波段的累积直方图,确定所述累积直方图中2%处像元的灰度值以及99%处像元的灰度值;Calculate a cumulative histogram of the at least one band according to the characteristic information, and determine the gray value of the pixels at 2% and the gray value of the pixels at 99% of the cumulative histogram;

根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸。The feature information is linearly stretched according to the gray value of the pixel at 2% and the gray value of the pixel at 99%.

可选地,所述拉伸单元202,具体用于:根据如下公式对所述特征信息进行线性拉伸:Optionally, the stretching unit 202 is specifically configured to linearly stretch the feature information according to the following formula:

其中,g(x,y)表示拉伸后影像中(x,y)处的特征信息;f(x,y)表示拉伸前影像中(x,y)处的特征信息;min表示2%处像元的灰度值;max表示99%处像元的灰度值。Among them, g(x, y) represents the characteristic information at (x, y) in the image after stretching; f(x, y) represents the characteristic information at (x, y) in the image before stretching; min represents 2% The gray value of the pixel at 99%; max represents the gray value of the pixel at 99%.

可选地,所述判断单元203,具体用于:Optionally, the judgment unit 203 is specifically used to:

根据所述第一特征信息确定像元的个数,每个像元的像元值,以及中位数,其中,所述中位数是指累积直方图中50%处像元的像元值;The number of pixels, the pixel value of each pixel, and the median are determined according to the first feature information, where the median refers to the pixel value of 50% of the pixels in the cumulative histogram. ;

根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值;Calculate the pixel mean value of each pixel according to the number of the pixels and the pixel value of each pixel;

根据所述每个像元的像元均值计算得到所述每个像元的像元均方差。The pixel mean square error of each pixel is calculated based on the pixel mean value of each pixel.

可选地,所述生成单元204,具体用于:根据如下公式对所述第一特征信息进行伽马拉伸:Optionally, the generating unit 204 is specifically configured to perform gamma stretching on the first feature information according to the following formula:

其中,γ表示伽马拉伸系数,medianv表示中位数,t1、t2表示预设第二阈值;h(x,y)表示(x,y)处像元的第二特征信息。Among them, γ represents the gamma stretching coefficient, medianv represents the median, t 1 and t 2 represent the preset second threshold; h(x, y) represents the second feature information of the pixel at (x, y).

可选地,参见图3,所述装置还包括计算单元205;所述计算单元205,具体用于:Optionally, referring to Figure 3, the device further includes a computing unit 205; the computing unit 205 is specifically used for:

根据所述特征信息计算所述每个波段的大气层顶的反射率,并根据所述反射率对所述特征信息进行预处理。The reflectivity of the top of the atmosphere of each band is calculated according to the characteristic information, and the characteristic information is preprocessed according to the reflectivity.

参见图4,本申请提供一种计算机设备,该计算机设备,包括:Referring to Figure 4, this application provides a computer device, which includes:

存储器401,用于存储至少一个处理器所执行的指令;Memory 401, used to store instructions executed by at least one processor;

处理器402,用于执行存储器中存储的指令执行图1所述的方法。The processor 402 is configured to execute instructions stored in the memory to perform the method described in Figure 1 .

本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行第一方面所述的方法。The present application provides a computer-readable storage medium that stores computer instructions. When the computer instructions are run on a computer, they cause the computer to execute the method described in the first aspect.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will understand that embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk storage and optical storage, etc.) embodying computer-usable program code therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions The device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (3)

1.一种光学遥感影像快视图的生成方法,其特征在于,包括:1. A method for generating a quick view of an optical remote sensing image, which is characterized by including: 对待处理的光学遥感影像进行下重采样得到采样后的像元,并确定采样后的像元的特征信息;Resample the optical remote sensing image to be processed to obtain the sampled pixels, and determine the characteristic information of the sampled pixels; 对待处理的光学遥感影像进行下重采样得到采样后的像元,包括:Resample the optical remote sensing image to be processed to obtain the sampled pixels, including: 确定所述待处理的光学遥感影像的波段信息以及尺寸信息,根据所述波段信息确定出生成快视图的至少一个波段;Determine the band information and size information of the optical remote sensing image to be processed, and determine at least one band for generating a quick view based on the band information; 提取所述至少一个波段的像元,根据所述尺寸信息确定采样比例,并根据所述采样比例对所述至少一个波段的像元进行下重采样得到所述采样后的像元;Extract the pixels of the at least one band, determine a sampling ratio according to the size information, and perform down-resampling of the pixels of the at least one band according to the sampling ratio to obtain the sampled pixels; 根据所述波段信息确定至少一个波段,包括:Determining at least one band based on the band information includes: 若所述波段信息为全色波段,则所述至少一个波段为所述全色波段;或If the band information is a panchromatic band, then the at least one band is the panchromatic band; or 若所述波段信息为多波段,则所述至少一个波段为红、绿、蓝三个波段;If the band information is multi-band, the at least one band is red, green and blue; 对所述特征信息进行线性拉伸,得到增强后的第一特征信息;Linearly stretch the feature information to obtain enhanced first feature information; 根据所述第一特征信息计算每个波段中像元的特征参数,判断所述特征参数是否小于预设第一阈值;Calculate the characteristic parameters of the pixels in each band according to the first characteristic information, and determine whether the characteristic parameters are less than a preset first threshold; 若小于,则对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,并根据所述第二特征信息生成快视图;If it is less than, perform gamma stretching on the first feature information to obtain enhanced second feature information, and generate a quick view based on the second feature information; 对所述特征信息进行线性拉伸,包括:Linear stretching of the feature information includes: 根据所述特征信息计算所述至少一个波段的累积直方图,确定所述累积直方图中2%处像元的灰度值以及99%处像元的灰度值;Calculate a cumulative histogram of the at least one band according to the characteristic information, and determine the gray value of the pixels at 2% and the gray value of the pixels at 99% of the cumulative histogram; 根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸;Linearly stretch the feature information according to the grayscale value of the pixels at 2% and the grayscale value of the pixels at 99%; 根据所述2%处像元的灰度值以及所述99%处像元的灰度值对所述特征信息进行线性拉伸,包括:Linearly stretching the feature information according to the gray value of the pixel at 2% and the gray value of the pixel at 99% includes: 根据如下公式对所述特征信息进行线性拉伸:The feature information is linearly stretched according to the following formula: 其中,g(x,y)表示拉伸后影像中(x,y)处的特征信息;f(x,y)表示拉伸前影像中(x,y)处的特征信息;min表示2%处像元的灰度值;max表示99%处像元的灰度值;Among them, g(x, y) represents the characteristic information at (x, y) in the image after stretching; f(x, y) represents the characteristic information at (x, y) in the image before stretching; min represents 2% The gray value of the pixel; max represents the gray value of the pixel at 99%; 根据所述第一特征信息计算所述每个波段中像元的特征参数,包括:Calculating the characteristic parameters of the pixels in each band according to the first characteristic information includes: 根据所述第一特征信息确定像元的个数,每个像元的像元值,以及中位数,其中,所述中位数是指累积直方图中50%处像元的像元值;The number of pixels, the pixel value of each pixel, and the median are determined according to the first feature information, where the median refers to the pixel value of 50% of the pixels in the cumulative histogram. ; 根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值;Calculate the pixel mean value of each pixel according to the number of the pixels and the pixel value of each pixel; 根据所述每个像元的像元均值计算得到所述每个像元的像元均方差;Calculate the pixel mean square error of each pixel based on the pixel mean value of each pixel; 对所述第一特征信息进行伽马拉伸,得到增强后的第二特征信息,包括:Perform gamma stretching on the first feature information to obtain enhanced second feature information, including: 根据如下公式对所述第一特征信息进行伽马拉伸:The first feature information is gamma stretched according to the following formula: 其中,γ表示伽马拉伸系数,medianv表示中位数,t1、t2表示预设第二阈值;h(x,y)表示(x,y)处像元的第二特征信息;Among them, γ represents the gamma stretching coefficient, medianv represents the median, t 1 and t 2 represent the preset second threshold; h(x, y) represents the second feature information of the pixel at (x, y); 根据所述像元的个数以及所述每个像元的像元值计算得到所述每个像元的像元均值,包括:根据如下公式计算所述每个像元的像元均值:Calculating the pixel mean value of each pixel based on the number of pixels and the pixel value of each pixel includes: calculating the pixel mean value of each pixel according to the following formula: 其中,μ表示所述每个波段像元均值;m(x,y)表示(x,y)处像元的像元值;p表示所述像元的个数;Among them, μ represents the mean value of the pixels in each band; m(x, y) represents the pixel value of the pixel at (x, y); p represents the number of the pixels; 根据所述每个像元的像元均值计算得到所述每个像元的像元均方差,包括:根据如下公式计算所述每个像元的像元均方差:Calculating the pixel mean square error of each pixel based on the pixel mean value of each pixel includes: calculating the pixel mean square error of each pixel according to the following formula: 其中,σ表示所述每个像元的像元均方差。Among them, σ represents the pixel mean square error of each pixel. 2.如权利要求1所述的方法,其特征在于,根据所述尺寸信息确定采样比例,包括:2. The method of claim 1, wherein determining the sampling ratio according to the size information includes: 根据如下公式确定采样比例:Determine the sampling ratio according to the following formula: 其中,n表示所述待处理的光学遥感影像的像元的个数;imgh表示所述待处理的光学遥感影像的像元的行数;imgw表示所述待处理的光学遥感影像的像元的列数。Where, n represents the number of pixels of the optical remote sensing image to be processed; imgh represents the number of rows of pixels of the optical remote sensing image to be processed; imgw represents the number of pixels of the optical remote sensing image to be processed. Number of columns. 3.如权利要求1~2任一项所述的方法,其特征在于,对所述特征信息进行线性拉伸之前,还包括:3. The method according to any one of claims 1 to 2, characterized in that, before linearly stretching the feature information, it further includes: 根据所述特征信息计算所述每个波段的大气层顶的反射率,并根据所述反射率对所述特征信息进行预处理。The reflectivity of the top of the atmosphere of each band is calculated according to the characteristic information, and the characteristic information is preprocessed according to the reflectivity.
CN202010286498.8A 2020-04-13 2020-04-13 Method and device for generating optical remote sensing image fast view Active CN111553852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010286498.8A CN111553852B (en) 2020-04-13 2020-04-13 Method and device for generating optical remote sensing image fast view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010286498.8A CN111553852B (en) 2020-04-13 2020-04-13 Method and device for generating optical remote sensing image fast view

Publications (2)

Publication Number Publication Date
CN111553852A CN111553852A (en) 2020-08-18
CN111553852B true CN111553852B (en) 2023-10-27

Family

ID=72007418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010286498.8A Active CN111553852B (en) 2020-04-13 2020-04-13 Method and device for generating optical remote sensing image fast view

Country Status (1)

Country Link
CN (1) CN111553852B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019131A (en) * 2009-07-09 2011-01-27 Seiko Epson Corp Image processor and image processing method
CN107527333A (en) * 2017-07-31 2017-12-29 湖北工业大学 A kind of rapid image Enhancement Method based on gamma transformation
CN109191390A (en) * 2018-08-03 2019-01-11 湘潭大学 A kind of algorithm for image enhancement based on the more algorithm fusions in different colours space
CN109447915A (en) * 2018-10-29 2019-03-08 北京康拓红外技术股份有限公司 The line scan image increased quality method with gamma gray correction is established based on characteristic model
CN110415185A (en) * 2019-07-02 2019-11-05 长江大学 A kind of improved Wallis shade automatic compensating method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194146B2 (en) * 2004-12-22 2007-03-20 Slooh, Llc Automated system and method for processing of astronomical images
EP2098059B1 (en) * 2006-11-24 2011-02-23 Robert Bosch GmbH Process, apparatus and computer program for enhancing detail visibility in an input image
CN101833754B (en) * 2010-04-15 2012-05-30 青岛海信网络科技股份有限公司 Image enhancement method and system
CN102968768A (en) * 2012-11-26 2013-03-13 北京理工大学 Thermal modulation method for infrared gas image
CN103761714A (en) * 2014-01-23 2014-04-30 武汉大学 Color image enhancement method based on HIS color space
CN109360148B (en) * 2018-09-05 2023-11-07 北京悦图遥感科技发展有限公司 Remote sensing image super-resolution reconstruction method and device based on mixed random downsampling

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019131A (en) * 2009-07-09 2011-01-27 Seiko Epson Corp Image processor and image processing method
CN107527333A (en) * 2017-07-31 2017-12-29 湖北工业大学 A kind of rapid image Enhancement Method based on gamma transformation
CN109191390A (en) * 2018-08-03 2019-01-11 湘潭大学 A kind of algorithm for image enhancement based on the more algorithm fusions in different colours space
CN109447915A (en) * 2018-10-29 2019-03-08 北京康拓红外技术股份有限公司 The line scan image increased quality method with gamma gray correction is established based on characteristic model
CN110415185A (en) * 2019-07-02 2019-11-05 长江大学 A kind of improved Wallis shade automatic compensating method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
一种基于直方图变换的光学遥感影像自动增强方法;刘新颜;柳稼航;延军平;;西北大学学报(自然科学版)(第03期) *
两种遥感图像增强方法对图像分类的适宜性分析;王志杰;谭伟;罗扬;;山地农业生物学报(第04期) *
基于自适应伽马转换函数的遥感图像增强;刘攀;侯晓荣;;电脑知识与技术(第03期) *
改进重构的自适应权重Retinex图像增强算法;李忠海;陈灿灿;金海洋;;火力与指挥控制(第04期) *

Also Published As

Publication number Publication date
CN111553852A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
Wang et al. Gladnet: Low-light enhancement network with global awareness
US20200234414A1 (en) Systems and methods for transforming raw sensor data captured in low-light conditions to well-exposed images using neural network architectures
CN110175964A (en) Retinex image enhancement method based on Laplacian pyramid
CN101916431B (en) Low-illumination image data processing method and system
US20100232685A1 (en) Image processing apparatus and method, learning apparatus and method, and program
WO2019205751A1 (en) Image enhancement method
CN110268420B (en) Computer-implemented method of detecting a foreign object on a background object in an image, device for detecting a foreign object on a background object in an image, and computer program product
CN113436071B (en) Multi-source satellite remote sensing image mosaic method, system and storage medium
Li et al. Fast region-adaptive defogging and enhancement for outdoor images containing sky
CN112991236B (en) Image enhancement method and device based on template
US11223744B2 (en) Local color range selection
WO2022089386A1 (en) Laser pattern extraction method and apparatus, and laser measurement device and system
CN105405138B (en) Waterborne target tracking based on conspicuousness detection
KR20210064193A (en) Image processing apparatus, image processing method, and program
CN113095470A (en) Neural network training method, image processing method and device, and storage medium
CN115410074B (en) Remote sensing image cloud detection method and device
CN115019160B (en) Method for controlling image quality of warehouse goods in factory
JP2019016117A (en) Image adjustment apparatus, local contrast amount calculation apparatus, method, and program
WO2020107308A1 (en) Low-light-level image rapid enhancement method and apparatus based on retinex
CN116109535A (en) Image fusion method, device and computer readable storage medium
CN116309133A (en) Low-light image enhancement method for local and global self-adaptive contrast correction
WO2023110880A1 (en) Image processing methods and systems for low-light image enhancement using machine learning models
CN111553852B (en) Method and device for generating optical remote sensing image fast view
CN113379620B (en) An optical remote sensing satellite image cloud detection method
CN116977190A (en) Image processing method, apparatus, device, storage medium, and program product

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
GR01 Patent grant
GR01 Patent grant