Automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring
The automatic registration system for multi-source remote sensing images used in integrated forestry and grassland monitoring has solved the problem of image fusion failure caused by duplicate multispectral file paths, achieving efficient image data correction and fusion, and improving the accuracy and flexibility of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT FORESTRY & GRASSLAND ADMINISTRATION IND DEV PLANNING INST
- Filing Date
- 2024-11-26
- Publication Date
- 2026-07-17
AI Technical Summary
In traditional multi-source remote sensing image data processing, the repetition of multispectral file paths prevents adjacent images from being fused, and projection errors also exist, affecting the data processing effect.
An automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring is adopted. Through the combination of a storage module, a reading module, a removal module, an orthorectification module, a monitoring module, and a verification module, the system achieves automatic registration and correction of image data, removes duplicate data, and uses a digital elevation model to correct errors caused by topographic relief.
It improves the fusion quality and readability of image data, enhances the flexibility of system data retrieval, ensures that image data meets the set projection and pixel displacement requirements, and realizes an efficient automatic registration process.
Smart Images

Figure CN119672074B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-source remote sensing image processing technology, and particularly to an automatic registration technology for multi-source remote sensing images, and especially to an automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring. Background Technology
[0002] Traditional multi-source remote sensing image data requires preprocessing to ensure that the multispectral file path of each image is unique. If duplicate multispectral file paths exist, the duplicate data must be deleted before the data can be projected. Since each image has a certain error, adjacent images cannot be fused during projection. Summary of the Invention
[0003] To address the problems of existing technologies, this invention provides an automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring.
[0004] Its main technical solutions are as follows:
[0005] This invention provides an automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring, comprising:
[0006] The repository is used to store satellite data, and different storage blocks are constructed according to the different types of satellite data;
[0007] The reading module is used to read satellite data according to different storage blocks and decompress the satellite data; after decompression, the reading module uses the identification matrix set in the reading module to identify the decompressed data in order to obtain each image and the multispectral file path of each image contained in the satellite data.
[0008] The removal module, connected to the reading module, is used to cache the image that is repeatedly contained in the satellite data and the multispectral file path of each image to form a data resource to be used.
[0009] The orthorectification module outputs a geographic coordinate system; according to the multispectral file path of each image, the loading module sequentially loads each image stored in the reading module, projects each image in the geographic coordinate system, and uses the digital elevation model data within the range of each image to correct the projection error and image point displacement caused by terrain undulation, thereby obtaining the automatically registered image data output, and setting the automatically registered image data output to a revocable state.
[0010] The monitoring module, connected to the rejection module and the orthorectification module, is used to establish a monitoring unit by linking the data resources to be used with the corresponding images of each scene retained in the reading module. The monitoring unit is used to track the data retrieval process of each image retained in the reading module and record the retrieval path.
[0011] The verification module, connected to the orthorectification module, monitoring module, and removal module, is used to detect the projection of image data and image point displacement in the geographic coordinate system to check whether the set projection and image point displacement requirements are met. If not, the first control unit set in the verification module controls the orthorectification module to cancel the automatically registered image data and restore it to the loading step. After restoring to the loading step, the second control unit set in the verification module controls the loading module to load the pending data resources to the orthorectification module according to the calling path. Then, the orthorectification module completes automatic registration with the pending data resources and outputs the image data corresponding to the pending data resources. The image data corresponding to the pending data resources is set to a revocable state. Then, the verification module is used again to detect the projection of the image data corresponding to the pending data resources in the geographic coordinate system and the image point displacement until the set projection and image point displacement requirements are met.
[0012] Furthermore, the reading module has:
[0013] Several read paths are configured, and each read path is configured to correspond one-to-one with a storage block through a uniquely configured code, for reading satellite data within the storage block through the read path;
[0014] The decompression unit is configured to uniquely correspond to each reading path, receive satellite data read by the reading path, and decompress the satellite data. The parent folder of the decompressed satellite data will display the complete path of the multispectral file of each image in the file list.
[0015] The recognition matrix has the following characteristics:
[0016] Logic control unit;
[0017] Several identification units, each under the control of the logic control unit, parse the reading path in the corresponding decompression unit to identify the category of satellite data by the encoding in the reading path; and identify the parent folder after decompression; to obtain each image and the multispectral file path of each image contained in the satellite data;
[0018] Several deduplication detection units are provided, each corresponding to an identification unit. The deduplication detection units are used to compare the multispectral file paths of each image to check for duplicate image data.
[0019] Furthermore, the elimination module is used to obtain the comparison result of the multispectral file path of each image according to the deduplication unit set in the recognition matrix, and to perform elimination processing according to whether there is duplicate image data in the comparison result. When there is duplicate image data, the duplicate images and multispectral file paths of each image contained in the satellite data are cached to form unused data resources.
[0020] Furthermore, the orthorectification module has:
[0021] The first configuration unit is used to configure the reference parameters when outputting the geographic coordinate system;
[0022] The projection unit is connected to the first configuration unit and projects each image in the geographic coordinate system using the reference parameters set by the first configuration unit when outputting the geographic coordinate system.
[0023] The second configuration unit is used to perform basic configuration of the digital elevation model to form a correction unit that uses the digital elevation model for correction. The correction unit corrects the projection error and image point displacement caused by terrain undulation within the range of each acquired image to obtain image data after automatic registration.
[0024] A state setting unit is configured to control the operation flow of the projection unit and the correction unit. Whenever the correction unit completes the data correction of a single image, the state setting unit sets the image data that has been corrected and is automatically registered to a state that can be revoked.
[0025] Furthermore, the state revocability refers to the ability to retract the operation flow of the projection unit and the correction unit under the control of the state setting unit, so as to return to the initial process of orthorectification.
[0026] Furthermore, the monitoring module is equipped with several monitoring units; each monitoring unit is configured to track the data retrieval process of each image stored in the reading module and record the retrieval path;
[0027] The data retrieval process for each image includes:
[0028] By comparing the multispectral file paths of each image obtained from monitoring, we can determine whether each image read from the reading module has unused data resources I that have been cached due to duplication.
[0029] Monitor the movement path of each image read from the reading module during projection and correction operations, track the data retrieval process of each image based on the movement path, and form retrieval path II.
[0030] Furthermore, when monitoring the data retrieval process of each image, time is used as the benchmark in the tracking process to monitor the movement path of each image read from the reading module during the projection and correction operations.
[0031] Furthermore, the projection of the image data and the image point displacement are detected by using orthorectification parameters and multispectral-panchromatic registration parameters to check whether the set projection and image point displacement requirements are met.
[0032] The degree of fusion is determined by comparing whether two adjacent image data can achieve corresponding matching fusion during the fusion process.
[0033] Before performing automatic registration of multi-source remote sensing image data, this application categorizes and stores the multi-source remote sensing image data, storing different types of satellite data in corresponding storage blocks. The satellite data includes data from Gaofen-1, Gaofen-2, Gaofen-6, China-Brazil, and ZYSputnik satellites. Each storage block stores data acquired by one type of satellite, allowing for the retrieval of data from different satellites.
[0034] In this application, during orthorectification, duplicate data is not completely removed. Instead, the elimination module compares the multispectral file paths of each image scene using the deduplication unit set in the identification matrix. The comparison results are then used to eliminate duplicate image data based on whether duplicates exist. If duplicate image data is found, the duplicate images and their multispectral file paths are cached to form usable data resources. During refraction correction, a basic configuration of the digital elevation model (DEM) is first performed to form a correction unit that uses the DEM for correction. This correction unit corrects the projection errors and image point displacements caused by terrain undulations within the acquired image scene range, resulting in automatically registered image data. Then, a state setting unit controls the operation flow of the projection unit and the correction unit. Whenever the correction unit completes the correction of an image scene, the state setting unit sets the corrected and automatically registered image data to a revocable state. Then, the detection module checks the projection of the image data and the displacement of the image points in the geographic coordinate system to see if the set projection and displacement requirements are met. If not, the first control unit in the verification module controls the orthorectification module to cancel the automatically registered image data and restore it to the loading step. After restoring to the loading step, the second control unit in the verification module controls the loading module to load the pending data resources to the orthorectification module according to the calling path. Then, the orthorectification module completes the automatic registration with the pending data resources and outputs the image data corresponding to the pending data resources. The image data corresponding to the pending data resources is set to a revocable state. Then, the verification module is used again to check the projection of the image data corresponding to the pending data resources in the geographic coordinate system and the displacement of the image points until the set projection and displacement requirements are met. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the automatic registration system for multi-source remote sensing images provided by the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0038] The basic principles of this application are as follows;
[0039] The multi-source remote sensing image automatic registration system based on integrated forestry and grassland monitoring provided in this application includes functions such as orthorectification, panchromatic-multispectral automatic registration, panchromatic-multispectral fusion, and image stretching. It allows for independent selection of input and output data, and all necessary processing parameters are displayed on the interface, offering high convenience.
[0040] This application automatically identifies data from Gaofen-1, Gaofen-2, Gaofen-6, China-Brazil, and ZYS satellites in the input folder and displays the multispectral file path of each image on the interface, allowing users to check whether all data has been correctly read. It features image removal and caching functions, which can remove duplicate data and cache it, enhancing the flexibility of system data retrieval.
[0041] The system supports two orthorectification methods: DEM reference and average elevation reference, and allows users to specify the output resolution of the image. Automatic registration of multispectral and panchromatic images is possible, eliminating unstable factors such as water bodies from affecting the automatically registered images, thus ensuring the quality of the later fused images. To achieve good visual effects and facilitate the interpretation of ground features, the system supports image stretching, performing linear stretching by a percentage to improve image readability. Furthermore, information such as resampling, output format, and output band settings during image processing are all displayed on the interface, allowing users to manually modify them as needed, greatly enhancing the system's flexibility.
[0042] This invention provides an automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring, comprising:
[0043] The repository is used to store satellite data, and different storage blocks are constructed according to the different types of satellite data;
[0044] The reading module is used to read satellite data according to different storage blocks and decompress the satellite data; after decompression, the reading module uses the identification matrix set in the reading module to identify the decompressed data in order to obtain each image and the multispectral file path of each image contained in the satellite data.
[0045] The removal module, connected to the reading module, is used to cache the image that is repeatedly contained in the satellite data and the multispectral file path of each image to form a data resource to be used.
[0046] The orthorectification module outputs a geographic coordinate system; according to the multispectral file path of each image, the loading module sequentially loads each image stored in the reading module, projects each image in the geographic coordinate system, and uses the digital elevation model data within the range of each image to correct the projection error and image point displacement caused by terrain undulation, thereby obtaining the automatically registered image data output, and setting the automatically registered image data output to a revocable state.
[0047] The monitoring module, connected to the rejection module and the orthorectification module, is used to establish a monitoring unit by linking the data resources to be used with the corresponding images of each scene retained in the reading module. The monitoring unit is used to track the data retrieval process of each image retained in the reading module and record the retrieval path.
[0048] The verification module, connected to the orthorectification module, monitoring module, and removal module, is used to detect the projection of image data and image point displacement in the geographic coordinate system to check whether the set projection and image point displacement requirements are met. If not, the first control unit set in the verification module controls the orthorectification module to cancel the automatically registered image data and restore it to the loading step. After restoring to the loading step, the second control unit set in the verification module controls the loading module to load the pending data resources to the orthorectification module according to the calling path. Then, the orthorectification module completes automatic registration with the pending data resources and outputs the image data corresponding to the pending data resources. The image data corresponding to the pending data resources is set to a revocable state. Then, the verification module is used again to detect the projection of the image data corresponding to the pending data resources in the geographic coordinate system and the image point displacement until the set projection and image point displacement requirements are met.
[0049] Furthermore, the reading module has:
[0050] Several read paths are configured, and each read path is configured to correspond one-to-one with a storage block through a uniquely configured code, for reading satellite data within the storage block through the read path;
[0051] The decompression unit is configured to uniquely correspond to each reading path, receive satellite data read by the reading path, and decompress the satellite data. The parent folder of the decompressed satellite data will display the complete path of the multispectral file of each image in the file list.
[0052] The recognition matrix has the following characteristics:
[0053] Logic control unit;
[0054] Several identification units, each under the control of the logic control unit, parse the reading path in the corresponding decompression unit to identify the category of satellite data by the encoding in the reading path; and identify the parent folder after decompression; to obtain each image and the multispectral file path of each image contained in the satellite data;
[0055] Several deduplication detection units are provided, each corresponding to an identification unit. The deduplication detection units are used to compare the multispectral file paths of each image to check for duplicate image data.
[0056] Furthermore, the elimination module is used to obtain the comparison result of the multispectral file path of each image according to the deduplication unit set in the recognition matrix, and to perform elimination processing according to whether there is duplicate image data in the comparison result. When there is duplicate image data, the duplicate images and multispectral file paths of each image contained in the satellite data are cached to form unused data resources.
[0057] Furthermore, the orthorectification module has:
[0058] The first configuration unit is used to configure the reference parameters when outputting the geographic coordinate system;
[0059] The projection unit is connected to the first configuration unit and projects each image in the geographic coordinate system using the reference parameters set by the first configuration unit when outputting the geographic coordinate system.
[0060] The second configuration unit is used to perform basic configuration of the digital elevation model to form a correction unit that uses the digital elevation model for correction. The correction unit corrects the projection error and image point displacement caused by terrain undulation within the range of each acquired image to obtain image data after automatic registration.
[0061] A state setting unit is configured to control the operation flow of the projection unit and the correction unit. Whenever the correction unit completes the data correction of a single image, the state setting unit sets the image data that has been corrected and is automatically registered to a state that can be revoked.
[0062] Furthermore, the state revocability refers to the ability to retract the operation flow of the projection unit and the correction unit under the control of the state setting unit, so as to return to the initial process of orthorectification.
[0063] Furthermore, the monitoring module is equipped with several monitoring units; each monitoring unit is configured to track the data retrieval process of each image stored in the reading module and record the retrieval path;
[0064] The data retrieval process for each image includes:
[0065] By comparing the multispectral file paths of each image obtained from monitoring, we can determine whether each image read from the reading module has unused data resources I that have been cached due to duplication.
[0066] Monitor the movement path of each image read from the reading module during projection and correction operations, track the data retrieval process of each image based on the movement path, and form retrieval path II.
[0067] Furthermore, when monitoring the data retrieval process of each image, time is used as the benchmark in the tracking process to monitor the movement path of each image read from the reading module during the projection and correction operations.
[0068] Furthermore, the projection of the image data and the image point displacement are detected by using orthorectification parameters and multispectral-panchromatic registration parameters to check whether the set projection and image point displacement requirements are met.
[0069] The degree of fusion is determined by comparing whether two adjacent image data can achieve corresponding matching fusion during the fusion process.
[0070] Before performing automatic registration of multi-source remote sensing image data, this application categorizes and stores the multi-source remote sensing image data, storing different types of satellite data in corresponding storage blocks. The satellite data includes data from Gaofen-1, Gaofen-2, Gaofen-6, China-Brazil, and ZYSputnik satellites. Each storage block stores data acquired by one type of satellite, allowing for the retrieval of data from different satellites.
[0071] In this application, during orthorectification, duplicate data is not completely removed. Instead, the elimination module compares the multispectral file paths of each image scene using the deduplication unit set in the identification matrix. The comparison results are then used to eliminate duplicate image data based on whether duplicates exist. If duplicate image data is found, the duplicate images and their multispectral file paths are cached to form usable data resources. During refraction correction, a basic configuration of the digital elevation model (DEM) is first performed to form a correction unit that uses the DEM for correction. This correction unit corrects the projection errors and image point displacements caused by terrain undulations within the acquired image scene range, resulting in automatically registered image data. Then, a state setting unit controls the operation flow of the projection unit and the correction unit. Whenever the correction unit completes the correction of an image scene, the state setting unit sets the corrected and automatically registered image data to a revocable state. Then, the detection module checks the projection of the image data and the displacement of the image points in the geographic coordinate system to see if the set projection and displacement requirements are met. If not, the first control unit in the verification module controls the orthorectification module to cancel the automatically registered image data and restore it to the loading step. After restoring to the loading step, the second control unit in the verification module controls the loading module to load the pending data resources to the orthorectification module according to the calling path. Then, the orthorectification module completes the automatic registration with the pending data resources and outputs the image data corresponding to the pending data resources. The image data corresponding to the pending data resources is set to a revocable state. Then, the verification module is used again to check the projection of the image data corresponding to the pending data resources in the geographic coordinate system and the displacement of the image points until the set projection and displacement requirements are met.
[0072] When using this application, enter the parent folder button, select the parent folder containing the decompressed data from Gaofen-1, Gaofen-2, Gaofen-6, China-Brazil, and ZYS satellites, and the file list will display the complete path of the multispectral files for each image. After selection, you can delete a file or delete all files.
[0073] Orthorectification uses a DEM reference by default, outputting the geographic coordinate system at a resolution of 0.000018°. It corrects multispectral images based on panchromatic imagery. Registration parameters include search window size, grid size, control point thresholds, and the order of the fitted polynomial. It supports RCS, Brovey, and PCA fusion methods and allows image stretching based on a percentage of maximum and minimum values to enhance brightness and contrast, improving readability. It can output data in ENVI, TIFF, and JP2 formats. The number of threads can be selected. Multispectral, panchromatic, and fused images are stored in separate output folders for easy management. Simply click "Execute" to run the program.
[0074] The system interface displays numerous parameters. To facilitate user operation, the parameters for each step have been grouped into orthorectification parameters, multispectral-panchromatic registration parameters, fusion parameters, and an output folder. The system starts with a default set of parameters, which users can modify and adjust to suit their specific production needs.
[0075] For ease of implementation, the core code of the reading module includes:
[0076] DALDataset* poSrcDS_inputPan = (GDALDataset*)GDALOpen(QStr_to_str(BaseFile).c_str(), GA_ReadOnly);
[0077] if (poSrcDS_inputPan == NULL)
[0078] {
[0079] cout << progress_title.toLocal8Bit().data() << ": Failed to open the baseline image!" << endl;
[0080] emit progress(static_cast <int>(0), "", "error", "Auto-registration: Failed to open reference image!");
[0081] return false;
[0082] }
[0083] int height_inputPan = poSrcDS_inputPan->GetRasterYSize(); / / High
[0084] int width_inputPan = poSrcDS_inputPan->GetRasterXSize(); / / Width
[0085] int bandNum_inputPan = poSrcDS_inputPan->GetRasterCount(); / / Band count
[0086] GDALRasterBand *pBandR_inputPan = poSrcDS_inputPan->GetRasterBand(1);
[0087] int wdepth_inputPan = pBandR_inputPan->GetRasterDataType(); / / intwdepth depth
[0088] GDALDataType dataType_inputPan = pBandR_inputPan->GetRasterDataType(); / / Type
[0089] const char* Projection_inputPan = poSrcDS_inputPan->GetProjectionRef(); / / Projection information of the image
[0090] double adfGeo_inputPan[6]; / / Get the six parameters of the image.
[0091] poSrcDS_inputPan->GetGeoTransform(adfGeo_inputPan);
[0092] GDALDataset* poSrcDS_inputMss = (GDALDataset*)GDALOpen(QStr_to_str(RegFile).c_str(), GA_ReadOnly);
[0093] if (poSrcDS_inputMss == NULL)
[0094] {
[0095] GDALClose(poSrcDS_inputPan);
[0096] cout << progress_title.toLocal8Bit().data() << ": Failed to open the image to be registered!" << endl;
[0097] emit progress(static_cast <int>(0), "", "error", "Automatic registration: Failed to open the image to be registered!");
[0098] return false;
[0099] }
[0100] int height_inputMss = poSrcDS_inputMss->GetRasterYSize(); / / High
[0101] int width_inputMss = poSrcDS_inputMss->GetRasterXSize(); / / width
[0102] int bandNum_inputMss = poSrcDS_inputMss->GetRasterCount(); / / Band count
[0103] GDALRasterBand *pBandR_inputMss = poSrcDS_inputMss->GetRasterBand(1);
[0104] int wdepth_inputMss = pBandR_inputMss->GetRasterDataType(); / / intwdepth depth
[0105] GDALDataType dataType_inputMss = pBandR_inputMss->GetRasterDataType(); / / Type
[0106] const char* Projection_inputMss = poSrcDS_inputMss->GetProjectionRef(); / / Projection information of the image
[0107] double adfGeo_inputMss[6]; / / Get the six parameters of the image.
[0108] poSrcDS_inputMss->GetGeoTransform(adfGeo_inputMss).
[0109] This application allows for parameter input and configuration via an auxiliary display interface. The core code corresponding to the device is as follows:
[0110] The following 7 parameters were entered from the DOS interface.
[0111] dp->initr = InitialOffset_column_receive; / / Initial offset in pixels along the column direction
[0112] dp->initaz = InitialOffset_line_receive; / / Initial offset in pixels in the azimuth (line direction)
[0113] dp->nr = nr_receive; / * number of offsets in range, which is also the input parameter nr * /
[0114] dp->naz = naz_receive; / * number of offsets in azimuth, which is also the input parameter naz * /
[0115] / / search window sizes (32, 64, 128...) (range, azimuth)
[0116] dp->rwin = rwin_receive; / * range patch size, must be 2**n, which is also the input parameter rwin * /
[0117] dp->azwin = azwin_receive; / * azimuth patch size, must be 2**n, which is also the input parameter azwin * /
[0118] dp->thres = thres_receive; / * set the SNR threshold at 7.0 * /
[0119] dp->nr1 = width_inputPan; / / Number of columns in the baseline image
[0120] dp->naz1 = height_inputPan; / / Number of rows in the baseline image
[0121] dp->nrb1 = 0;
[0122] dp->nrps1 = width_inputPan; / / Number of columns in the baseline image
[0123] dp->rps1 = fabs(adfGeo_inputPan[1]); / / Resolution of the reference image column direction
[0124] dp->azps1 = fabs(adfGeo_inputPan[5]); / / Resolution of the reference image in the row direction
[0125] dp->nr2 = width_inputMss; / / Number of columns in the image to be corrected
[0126] dp->naz2 = height_inputMss; / / Number of rows in the image to be corrected
[0127] dp->nrb2 = 0;
[0128] dp->nrps2 = width_inputMss;
[0129] dp->rps2 = fabs(adfGeo_inputMss[1]); / / Resolution of the column direction of the image to be corrected
[0130] dp->azps2 = fabs(adfGeo_inputMss[5]);
[0131] / / / / Output diff.par file
[0132] / / FILE *dpf = fopen(output_diffPar, "w");
[0133] / / if (dpf == NULL)
[0134] / / {
[0135] / / cout << "create_diff_par ERROR: cannot open output DIFF_par file"<< output_diffPar << endl;
[0136] / / return false;
[0137] / / }
[0138] / / write_DIFF_par(dpf, dp);
[0139] / / fclose(dpf);
[0140] / / if (!create_diff_par(poSrcDS_inputPan, poSrcDS_inputMss, dp))
[0141] / / {
[0142] / / cout << "create_diff_par failed!" << endl;
[0143] / / return;
[0144] / / }
[0145] In this application, the basic code for orthorectification includes the following:
[0146] GDALDriver *poDriver = (GDALDriver *)GDALGetDriverByName(m_strFileType);
[0147] / / Change the output file type to be the same as the input full-color file; stop outputting float files because float files are too large.
[0148] GDALDataset *pDstDS_output_MSS_r = poDriver->Create(QStr_to_str(OutputData).c_str(), dp->nr1, dp->naz1, bandNum_inputMss, dataType_inputPan, CreateOption);
[0149] if (pDstDS_output_MSS_r == NULL)
[0150] {
[0151] GDALClose(poSrcDS_inputPan);
[0152] GDALClose(poSrcDS_inputMss);
[0153] cout << progress_title.toLocal8Bit().data() << ": Failed to create output file!" << endl;
[0154] emit progress(static_cast <int>(0), "", "error", "Auto-registration: Failed to create output file!");
[0155] return false;
[0156] }
[0157] if (adfGeo_inputPan[0] != 0) / / Projection field exists
[0158] {
[0159] pDstDS_output_MSS_r->SetGeoTransform(adfGeo_inputPan);
[0160] pDstDS_output_MSS_r->SetProjection(Projection_inputPan);
[0161] }
[0162] / / Calculate the maximum and minimum number of pixels for the row offset based on the fitted polynomial; this does not need to be done in the for loop.
[0163] double azoff_min = DBL_MAX; double azoff_max = -DBL_MAX;
[0164] for (int iaz = 0; iaz < dp->naz1; iaz++) / / Line loop
[0165] {
[0166] for (int ir = 0; ir < dp->nr1; ir++) / / Column loop
[0167] {
[0168] / / Formula: azoff = dp->azpoly[0] + ir * (dp->azpoly[1] + iaz * dp->azpoly[3] + ir * dp->azpoly[4]) + iaz * (dp->azpoly[2] + iaz * dp->azpoly[5]);
[0169] float azoff = az_poly1(dp->azpoly, (double)ir, (double)iaz);
[0170] if (azoff > azoff_max)
[0171] azoff_max = azoff;
[0172] if (azoff < azoff_min)
[0173] azoff_min = azoff;
[0174] }
[0175] }
[0176] int line0_off = (nint(fabs(azoff_min)) > nint(fabs(azoff_max))? nint(fabs(azoff_min)) : nint(fabs(azoff_max)));
[0177] int line1_off = (int(fabs(azoff_min)) > int(fabs(azoff_max))? int(fabs(azoff_min)) : int(fabs(azoff_max)));
[0178] line1_off = line1_off + 2;
[0179] int line_off = (line0_off > line1_off? line0_off : line1_off);
[0180] for (int i = 0; i < bandNum_inputMss; i++)
[0181] {
[0182] cout << endl << "正在纠正波段" << i + 1 << endl;
[0183] GDALRasterBand *poSrcDS_MssBandi = poSrcDS_inputMss->GetRasterBand(i + 1); / / 待纠正
[0184] GDALRasterBand *pDstDS_output_MSS_singleBand_r = pDstDS_output_MSS_r->GetRasterBand(i + 1); / / Output after correction
[0185] bool interp_real_re = interp_real_ushort(poSrcDS_MssBandi, pDstDS_output_MSS_singleBand_r, / *output_diffPar* / dp, / *output_MSS,* / imode, line_off, image_Num, crcl);
[0186] if (interp_real_re == false)
[0187] {
[0188] GDALClose(poSrcDS_inputPan);
[0189] GDALClose(poSrcDS_inputMss);
[0190] return interp_real_re;
[0191] }
[0192] }
[0193] GDALClose(poSrcDS_inputPan);
[0194] GDALClose(poSrcDS_inputMss);
[0195] GDALClose(pDstDS_output_MSS_r);
[0196] return true.
[0197] The basic code for the detection module is as follows:
[0198] bool orth_fuseThread::offset_pwrm(GDALDataset* poSrcDS_inputPan, GDALDataset* poSrcDS_inputMss, DIFF_PAR *dp, / *char *offs_file, * / fcomplex *offset_temp, / / Output, can be saved in memory
[0199] / *char *snr_file,* / float *snr_temp, / / Output, can be saved in memory
[0200] int rwin, int azwin, / / char *offsets_file, / / Output, can be saved in memory
[0201] int m_ovr, int nr, int naz, double thres_receive, int pflg, int image_Num, int crcl)
[0202] {
[0203] const char *aa = u8"Total input images";
[0204] string str_image_Num = to_string(image_Num); const char *bb = str_image_Num.c_str();
[0205] const char *cc = u8"scene, processing the";
[0206] string str_crcl = to_string(crcl + 1); const char *dd = str_crcl.c_str();
[0207] const char *ee = u8"scene registration: Searching for control points...";
[0208] char *RutaFinal = new char[strlen(aa) + strlen(bb) + strlen(cc) + strlen(dd) + strlen(ee) + 1];
[0209] strcpy(RutaFinal, aa); strcat(RutaFinal, bb); strcat(RutaFinal, cc);strcat(RutaFinal, dd); strcat(RutaFinal, ee);
[0210] fcomplex **mli3, **mli4; / * storage for interpolated MLI images * /
[0211] double azpl; / * azimuth peak position * /
[0212] double rpl; / * range peak position * /
[0213] double sc; / * intensity scale factor * /
[0214] int i, j; / * loop counters * /
[0215] int iaz, ir; / * azimuth and range loop counters * /
[0216] int off_r, off_az; / * initial range and azimuth offsets for eachline * /
[0217] int prflag = 1; / * offsets print flag * /
[0218] int j1, j2; / * range array locations for offsets * /
[0219] int jrp1, iazp1; / * integer position for offset estimate * /
[0220] int jrp2, iazp2; / * integer position for offset estimate * /
[0221] int zc1, zc2; / * zero counters * /
[0222] off_t b1off, b2off; / * byte offsets into SLC for fseek * /
[0223] unsigned int nfft[3];
[0224] / / FILE *off = fopen(offs_file, "wb");
[0225] / / if (off == NULL) {
[0226] / / fprintf(stderr, "\nERROR: cannot open binary offsets file: %s\n\n", offs_file);
[0227] / / return false;
[0228] / / }
[0229] / / FILE *snrf = fopen(snr_file, "wb");
[0230] / / if (snrf == NULL)
[0231] / / {
[0232] / / fprintf(stderr, "\nERROR: cannot open binary SNR file: %s\n\n",snr_file);
[0233] / / return false;
[0234] / / }.
[0235] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.< / int> < / int> < / int>
Claims
1. An automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring, characterized in that, include: The repository is used to store satellite data, and different storage blocks are constructed according to the different types of satellite data; The reading module is used to read satellite data according to different storage blocks and decompress the satellite data; After decompression, the decompressed data is identified using the recognition matrix set in the reading module to obtain each image and the multispectral file path of each image contained in the satellite data. The removal module, connected to the reading module, is used to cache the image that is repeatedly contained in the satellite data and the multispectral file path of each image to form a data resource to be used. The orthorectification module outputs a geographic coordinate system; according to the multispectral file path of each image, each image stored in the reading module is loaded sequentially, each image is projected in the geographic coordinate system, and the digital elevation model data within the range of each image is used to correct the projection error and image point displacement caused by terrain undulation, so as to obtain the image data output after automatic registration, and set the image data output after automatic registration to a state that can be revoked. The monitoring module, connected to the rejection module and the orthorectification module, is used to establish a monitoring unit by linking the data resources to be used with the corresponding images of each scene retained in the reading module. The monitoring unit is used to track the data retrieval process of each image retained in the reading module and record the retrieval path. The verification module, connected to the orthorectification module, monitoring module, and rejection module, is used to detect the projection of image data and image point displacement in the geographic coordinate system to check whether the set projection and image point displacement requirements are met. If not, the first control unit set in the verification module controls the orthorectification module to cancel the automatically registered image data and restore it to the loading step. After restoring to the loading step, the second control unit set in the verification module controls the loading module to load the pending data resources to the orthorectification module according to the calling path. Then, the orthorectification module completes automatic registration with the pending data resources and outputs the image data corresponding to the pending data resources. The image data corresponding to the pending data resources is set to the revocable state. Then, the verification module is used again to detect the projection of the image data corresponding to the pending data resources in the geographic coordinate system and the image point displacement until the set projection and image point displacement requirements are met. During orthorectification, duplicate data is not completely removed. Instead, the elimination module compares the multispectral file path of each image with the deduplication unit set in the recognition matrix to obtain the comparison result. The elimination process is carried out based on whether there is duplicate image data in the comparison result. When duplicate image data is found, the duplicate images and their multispectral file paths in the satellite data are cached to form unused data resources. The reading module has: Several read paths are configured, and each read path is configured to correspond one-to-one with a storage block through a uniquely configured code, for reading satellite data within the storage block through the read path; The decompression unit is configured to uniquely correspond to each reading path, receive satellite data read by the reading path, and decompress the satellite data. The parent folder of the decompressed satellite data will display the complete path of the multispectral file of each image in the file list. The recognition matrix has the following characteristics: Logic control unit; Several identification units, each under the control of the logic control unit, parse the reading path in the corresponding decompression unit to identify the category of satellite data by the encoding in the reading path; and identify the parent folder after decompression; to obtain each image and the multispectral file path of each image contained in the satellite data; Several deduplication detection units are provided, each corresponding to an identification unit. The deduplication detection unit is used to compare the multispectral file paths of each image to check whether there is any duplication of image data. The elimination module is used to obtain the comparison result of the multispectral file path of each image according to the deduplication unit set in the recognition matrix, and to perform elimination processing according to whether there is duplicate image data in the comparison result. When there is duplicate image data, the duplicate images and multispectral file paths of each image contained in the satellite data are cached to form unused data resources.
2. The automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring according to claim 1, characterized in that, The orthorectification module has: The first configuration unit is used to configure the reference parameters when outputting the geographic coordinate system; The projection unit is connected to the first configuration unit and projects each image in the geographic coordinate system using the reference parameters set by the first configuration unit when outputting the geographic coordinate system. The second configuration unit is used to perform basic configuration of the digital elevation model to form a correction unit that uses the digital elevation model for correction. The correction unit corrects the projection error and image point displacement caused by terrain undulation within the range of each acquired image to obtain image data after automatic registration. A state setting unit is configured to control the operation flow of the projection unit and the correction unit. Whenever the correction unit completes the data correction of a single image, the state setting unit sets the image data that has been corrected and is automatically registered to a state that can be revoked.
3. The automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring according to claim 2, characterized in that, The term "state revocability" refers to the ability of the state setting unit to control the operation flow of the projection unit and the correction unit to be withdrawn, so as to return to the initial process of orthorectification.
4. The automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring according to claim 1, characterized in that, The monitoring module contains several monitoring units; each monitoring unit is configured to track the data retrieval process of each image stored in the reading module and record the retrieval path. The data retrieval process for each image includes: By comparing the multispectral file paths of each image obtained from monitoring, we can determine whether each image read from the reading module has unused data resources I that have been cached due to duplication. Monitor the movement path of each image read from the reading module during projection and correction operations, track the data retrieval process of each image based on the movement path, and form retrieval path II.
5. The automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring according to claim 4, characterized in that, When monitoring the data retrieval process of each image, time is used as the benchmark in the tracking process to monitor the movement path of each image read from the reading module during the projection and correction operations.
6. The automatic registration system for multi-source remote sensing images based on integrated forestry and grassland monitoring according to claim 1, characterized in that, The projection of image data and image point displacement are detected by using orthorectification parameters and multispectral-panchromatic registration parameters to check whether the set projection and image point displacement requirements are met. The degree of fusion is determined by comparing whether two adjacent image data can achieve corresponding matching fusion during the fusion process.