Geographical reference and geometric correction of images. Rationale for the use of these procedures, examples of tasks. Implementation in the ERDAS Imagine package. Linking a raster map
A. P. Kirpichnikov, D. I. Miftakhutdinov, I. S. Rizaev
SOLUTION OF THE PROBLEM OF CORRELATION OF IMAGE AND DIGITAL MAP OF THE TERRITORY
Keywords: image combination, digital terrain map, correlation image processing.
The paper considers the solution to the problem of linking an image and a digital map of the area using the method of correlation processing of two images, allowing to achieve high precision bindings for automatic elimination alignment errors between them.
Keywords: combining images, digital terrain maps, correlation image processing.
The work considers the solution of the binding images and digital maps by method of correlation processing of the two images to achieve high accuracy of snapping for automatically eliminating alignment errors between them.
Introduction
Currently, in Russian operating reconnaissance systems, the main goal is to find new (previously unknown) objects in a given area of the terrain. Therefore, an important task is to combine the terrain map (DTM) and its current image with subsequent analysis of the results of the combination and search for differences.
In practice, multi-temporal and multi-spectral images of the same object or area can differ significantly from each other and from their image on the digital digital computer. Thus, we are faced with a number of tasks of geometric and amplitude correction of images, their alignment and alignment. It is possible to bind using navigation parameters and using search algorithms, establishing correspondence between image elements.
Errors in the measurement of navigation parameters lead to errors in the alignment of the image and the DCM. The main reasons are:
1. Delay in the start of signal reception during image formation.
The error in determining the delay is formed due to the discrete value of the clock frequency of the reference oscillator (for example, 1/56 MHz)
56 10 6 [Hz] 2 56 10
2. Error in determining media height. Numerical error calculation (approximate):
3. Error in determining the boundaries of the image frame.
This error is determined primarily by the error of the angle sensor. The maximum linear error due to the error is determined
as Dmax STr = 1.74-10-3 Dmax.
4. Error in determining the coordinates of the aircraft in the ground coordinate system.
where D is the range to the image frame point, h is the height of the aircraft, D is the error in measuring the height of the aircraft, D is the error in determining the angular position of the antenna in radians, D^ is the error in determining the true heading of the aircraft in radians.
The total error in determining the image location is equal to the square root of the sum of the squares of the component errors.
To eliminate the resulting registration errors, it is possible to use correlation binding of processed images and DCM. At the same time, the main difficulties in creating algorithms include, first of all, differences in the principles of image acquisition. In addition, images of most objects depend significantly on the time of year. Therefore, when creating an algorithm for correlating images and DCM, it is necessary to be able to identify landmarks with stable characteristics.
Basic concepts of correlation and regression analysis
The main task of correlation analysis is to estimate the regression equation and determine the closeness of the relationship between the resulting characteristic and a variety of factor characteristics. The value of the correlation coefficient is an expression of the quantitative closeness of the relationship.
If we consider the general population, then to characterize the closeness of the relationship between two variables, we use the pair correlation coefficient p, otherwise, its assessment is the sample pair coefficient r.
If the form of the relationship is linear, then the pair correlation coefficient is calculated using the formula:
and the sample value - according to the formula:
Y(X - X)(Y -Y)
With a small number of observations, the sample correlation coefficient is calculated using the formula:
pX X T-X XX T
X X,2 - (X X)2
"X t 2 - (X T)2
Changes in the value of the correlation coefficient are in the range -1< г < 1.
If the correlation coefficient is in the range -1< г < 0, то между величинами Х и У - обратная корреляционная связь. Если коэффициент корреляции находится в интервале 0 < г < 1, то между величинами Х и У - прямая корреляционная связь.
Logic for using correlation binding
The main stages when combining include:
1. Identification of standards from the map, their pre-processing.
2. Transformation of image standards taking into account the geometry of the resulting image.
3. Image processing to highlight terrain objects.
4. Carrying out a correlation search for standards in the current image.
5. Clarification of the position of the combined image with the map (correction of navigation coordinates).
Let's take a closer look at some of the stages.
Obtaining standards
This stage is carried out by the operator or automatically based on knowledge of the intended area of action and the objects located on it, which can be divided into two groups. The first is point-based, in particular - towers, structures, etc. To highlight them in the image, you can use thresholding of image brightness values. However, the main difficulty arises when associating a given “bright” point with a terrain object, due to the fact that the threshold can be exceeded by another object. Insufficient detail of digital maps does not allow, in most cases, to identify point objects on the ground.
The second group includes extended objects with characteristic shapes. These include hydrography (rivers, lakes, coastlines), road networks, settlements, etc. These objects have characteristic images and, based on knowledge of their properties on the map, make it possible to obtain an image model for subsequent search. Research has shown the advisability of reducing standards to a binary form due to the fact that it is impossible to predict the brightness level of objects in the generated images. Figure 1 shows the acquisition of a binary image of a river using a DCM.
Rice. 1 - An example of obtaining a binary image of a river using a DCM
It is advisable to select characteristic areas of objects as reference ones, such as bends, intersections, and branches. They have narrow autocorrelation functions and should provide efficient search. It is possible to use an automatic algorithm for selecting the position of reference sections by analyzing the correlation function of the selected sections and the area from which they are formed. The landmarks used are selected for the intended area of the terrain, obtained from the readings navigation system taking into account the possible magnitude of its error.
Elimination of geometric distortions
An issue that requires consideration when implementing the correlation binding algorithm is the choice of the transformed area. In this case, two options are possible. The first is bringing reference terrain areas to the current image. This operation is more advantageous from the point of view of computing resources, since it is easier to process the binary reference image. The second method involves bringing the current image to a map of the area. The choice of transformation method is carried out taking into account the possibilities of direct implementation of the algorithms in practice.
Processing of received images
Directly searching for reference areas in the resulting images is impractical due to the large number of objects in the area and the presence of a significant noise component. Therefore, the search stage is preceded by the operation of selecting the desired objects. The main methods currently used to perform this operation are image segmentation and contouring. In addition, to reduce the dependence of image processing results on distorting random noise components, image filtering is performed. In this case, certain components of the image itself can act as interference.
Segmentation is often considered as the main initial stage of analysis when automating image acquisition methods, since the result is an image, the quality of which largely determines the success of solving the problem of identifying objects in the image and further correlation. Example of threshold binary
The segmentation of the resulting and transformed image is shown in Fig. 2.
Fig.2 - Example of a transformed image
Please note that to select different objects it is necessary to carry out different ways image processing. Thus, to highlight straight sections of roads, you can use special masks followed by threshold processing.
Finding the location of reference images on the current image (snapping)
The main variants of algorithms for establishing image similarity are associated with obtaining characteristics of the stochastic relationship of the current image fragment with a reference image of the area. The basis of these algorithms is the correlation and spectral theory of signals.
The image of the reference fragment (selected on the terrain map and represented by a matrix u0 of size pxn) is compared with the current images by image fragments in the “zone of interest” of size bxb. b=n+t, and the search area is determined by a possible error in the navigation system.
During the sliding search process, a “similarity function” is calculated between fragments of the reference and current images. It is necessary to find a similarity function that, with maximum accuracy and reliability, will allow you to localize a fragment of the image corresponding to the standard, thus establishing conjugate points in the images.
With the correlation method, a search is made for the maximum correlation coefficient (max(k,1)) of the current fragment with the standard
XXUo(x, Y)u(x, y)
/(k, I) =-^-]-_, (7)
^[^x, y)]2 XX2)2
where u0 and u are the centered brightness values of the standard and the image fragment. This operation is necessary to eliminate the dependence of the correlation coefficient value on the energy of the areas.
To comply with the conditions for detection reliability, it is necessary to set a threshold (gthor) for the cross-correlation value.
If max(k,1)>gpor, then the similarity of the found pair of fragments is guaranteed with a given probability.
Comrade The threshold value can be set by the probability of similarity of fragments and the correlation coefficient.
The disadvantage of the correlation similarity measure is its sensitivity to geometric distortions in the sizes of mating objects, which places high demands on the object segmentation algorithm based on the resulting image.
Usually, the accuracy of fragment combination and the probability of false binding are taken as criteria for the effectiveness of similarity identification procedures.
Figure 3 shows the search results for several reference fragments per image. The standards identified on the DCM are reduced to the geometry of the resulting image. Figure 4 shows the result of searching for a reference image in the case of reducing the image to the map geometry under the same conditions.
The relationship between the reference and the image can be calculated based on the spectral theory of signals. In fact, the method also searches for the correlation integral, only in the frequency domain. In this case, using fast Fourier transform algorithms, it is possible to significantly reduce the required computational costs for organizing calculations.
Based on the obtained values of the discrepancies between the predicted result of navigation and the positions of the reference calculated using the correlation integral, a correction to the position of the current image relative to the DCM is formed.
Rice. 3 - Search results for several reference fragments
Rice. 4 - Result of searching for a reference image in the case of reducing the image to the map geometry
The considered method of correlation processing of two images allows us to achieve high accuracy in linking the current image with a digital terrain map to automatically eliminate registration errors between them.
The paper proposes an algorithm for performing the binding, the main stages of which are the preparation of standards from the map, transformation and processing of terrain images and the implementation of correlation search. However, each of these stages during implementation requires taking into account the features of the survey systems used and digital maps of the area.
Literature
1. Baklitsky V.K. Correlation-extreme methods of navigation and guidance / Tver Publishing House: TO “Book Club”, 2009. - 360 p.
2. Gruzman I.S., Kirichuk V.S., Kosykh V.P. etc. Digital processing images in information systems./ Tutorial. - Novosibirsk: NSTU Publishing House, 2000. -168 p.
3. Kirpichnikov A.P., Miftakhutdinov D.I., Rizaev I.S. Solving the geopositioning problem using the correlation comparison method // Bulletin of the Technological University: T.18 No. 3; - 2015. - 308 p.
4. Miftakhutdinov D.I., Rizaev I.S. Features of the implementation of algorithms for combining images with digital terrain maps./ “Prospects for the integration of science and practice.” Materials of the II International Scientific and Practical Conference; Stavropol: 2015. - 94 p.
© A. P. Kirpichnikov - Doctor of Physics and Mathematics. sciences, head department intelligent systems and management of information resources of KNIGU, [email protected]; D. I. Miftakhutdinov - 2nd year master's student of the department automated systems information processing and management KNIGU-KAI; [email protected]; I. S. Rizaev - Ph.D. those. Sciences, Professor of the Department of Automated Information Processing and Control Systems of KNIGU-KAI; [email protected].
© A. P. Kirpichnikov - Dr. Sci., Head of the Department of Intelligent Systems & Information Systems Control, KNRTU, [email protected]; D. I. Miftakhutdinov - master student of the Department of Automated information processing and management, KNRTU-KAI, [email protected]; I. S. Rizaev - PhD, Professor of the Department of Automated information processing and management, KNRTU-KAI, [email protected].
In addition to the ability to add images to page content using FilePicker from visual editor TinyMCE, developers and designers at CMS Made Simple have been looking for the possibility of the so-called association of one image and page for a long time. What is this for? Here are some examples:
To create a graphical menu that displays not text, but an image. Look at an interesting example of a Mac-style graphical menu or a graphical menu with a hierarchy at the bottom of the site after the word Portfolio.
To create a list of pages (like a teaser) with an image attached to each page.
To limit page editors who are unable to reduce and neatly insert images into content. In this case, they are asked to select from the list one of the already loaded pictures, which is then inserted into the template in the right place the right size. Or the ability to upload images that will shrink automatically when loaded.
At the moment, there are three options for linking an image to a page (at least I don't know of any others).
Option 1: Image on the Options tab
This was the very first attempt to link an image to a page, which is still available on the tab Options when editing a page. Here you can select one of the images in the list of files that were previously downloaded to the folder uploads/images. The path to this folder can only be changed globally in the general site settings (Site Administration » General settings, tab Page editing settings). The selected image is made available in the menu template via a variable $node->image, and its sketch through $node->thumbnail. With this option you can associate only one image per page, i.e. 1:1.
Option 2: Image via tag (content_image)
Second try. The tag is added to the main site template. If you add the tag multiple times, you can attach multiple images for the same page. In this case, the administrative panel displays a drop-down menu for selecting downloaded files (as in option 1), and on the page itself it displays HTML tag img. (content_image) is more intelligent than the first option, in particular it allows you to configure the folder in which the images are stored.
But its big drawback, like the first option, is that the images that can be selected from the list must be downloaded first into the system using the file manager or in the Image Management item. If you (for educational purposes) removed the “Insert/Edit Image” button from the visual editor in order to prohibit their direct insertion into the site content, then your editor must first upload the pictures and then edit the page. The second drawback: if there are a lot of these images, then the list turns out to be huge and you can easily get confused in it.
Option 3: Using the GBFilePicker module
Extraordinarily flexible. It allows you not only to select already loaded images, but also to load them on the fly while editing the page, as well as delete and even edit already loaded ones. without leaving the content editing page. The list of images in the drop-down menu can be shown or disabled (for example, if there are already 100 images in the folder, then the list is most likely useless).
A few examples of how this tag might look in the admin interface on a content editing page, depending on the parameters used.
Module features: reducing files when downloading, excluding certain files from the list by suffix or prefix in the file name, the ability to limit extensions for downloaded files, the ability to limit access to files depending on the user, creating thumbnails. And I especially love this module because it not only shows the name of the file in the list, but also shows its sketch to the editor, which is extremely convenient for the forgetful.
This option is so far the best that I see in CMS Made Simple. This is what my website editors grasp intuitively.
Please enable JavaScript to view theThe raster map in the GIS "Map 2000" is in RSW format. The format was developed in 1992, its structure is close to the TIFF version 6 format. The main indicators characterizing a raster map are:
- image scale;
- image resolution;
- image size;
- image palette;
- planned image linking.
Image scale- a value characterizing the source material (as a result of scanning which this raster image was obtained). Image scale is the relationship between the distance on the source material and the corresponding distance on the ground.
Image Resolution- a value characterizing the scanning device on which the raster image was obtained. The resolution value shows how many elementary dots (pixels) the scanning device divides a meter (inch) of the original image into. In other words, this value shows the size of the “grain” of the raster image. The higher the resolution, the smaller the “grain”, which means the smaller the size of terrain objects that can be unambiguously identified (deciphered)
Image Size(height and width) - values that characterize the image itself. Using these values, you can determine the overall dimensions of the raster image in pixels (dots). The image size depends on the size of the source material being scanned and the resolution setting.
Image palette- a value characterizing the degree of display of color shades of the source material in a raster image. There are the following main palette types:
- two-color (black and white, one digit);
- 16 colors (or shades of gray, four digits);
- 256 colors (or shades of gray, eight digits);
- High Color (16 bits);
- True Color (24 or 32 bits).
If it is possible to select the resolution and image palette when scanning source materials (some scanning devices only work with fixed values), it should be taken into account that when increasing the resolution and choosing a higher degree of shade display, the volume of the resulting file increases sharply, which will subsequently affect the volume stored information and speed of display and processing of raster images. For example, when scanning source map materials, there is no need to use a palette of more than 256 colors, since in reality regular map As a rule, there are no more than 8 colors.
The image palette is stored in the source file, and the resolution and scale of the future image should be entered when converting the raster to an internal format. The exception is TIFF files, which store resolution in addition to the palette. For other cases, the resolution is indicated in accordance with the parameters selected during scanning. For example, domestic drum scanners from KSI scan with a resolution of 508 dots/inch (or 20,000 dots/meter). If you do not know the exact scale value of the processed materials, you should enter an approximate value (the scale value is automatically specified during the process of linking a raster image).
A raster image loaded into the system is not yet a raster map, since it does not have a planned reference. An untethered image is always added to the southwestern corner of the map dimensions. Therefore, if you are working with a large area of work, to quickly search for an added raster, you can use the “Go to raster” item in the raster image properties menu of the “Raster List” dialog.
Once linked, the raster map becomes a measuring document. Using a raster map, you can determine the coordinates of the objects depicted on it (when you move the cursor along the raster map, the current coordinates are displayed in the information field at the bottom of the screen). A linked raster map can be used as a stand-alone document or in conjunction with other data.
1.2. Converting raster data
The Panorama system processes raster maps presented in RSW format (internal system format). Data from other formats (PCX, BMP, TIFF) can be converted to RSW format using software Panorama systems. In addition, the system supports early version raster data structures RST ("Panorama under MS-DOS"). When you open an RST file, it is automatically converted to RSW format.
There are two ways to load a bitmap into the system:
- Opening a raster image as an independent document (the "Open" item in the "File" menu).
- Adding a bitmap to an already open document(vector, raster, matrix or combined map). Adding a raster image to an already open map is done through the "Add - Raster" item in the "File" menu or the "Raster List" item in the "View" menu.
1.3. Linking a raster map
The raster map is linked using the linked document, i.e. First you need to open a document oriented in given system coordinates (vector, raster or matrix map), add the raster to be referenced and perform the reference. You can link a raster using one of the methods provided in the raster properties ("List of rasters - Properties"). It should be remembered that all raster actions available in the raster image properties menu are performed on the CURRENT raster. Therefore, if an open document contains several rasters, you should activate (select in the list of open rasters) the one with which you currently want to work.
1.3.1. Snap by one point
Snapping is done by sequentially indicating a point on the raster and the point where the specified point should move after the transformation (from where to where). The transformation is performed by moving the entire raster in parallel without changing its scale or orientation.
1.3.2. Move to southwest corner
The transformation is carried out by parallel movement of the entire raster without changing its scale and orientation to the southwestern corner of the dimensions of the work area. It is advisable to use this snapping mode when you add an incorrectly linked raster to an open map, which is displayed far outside the work area. In this case, after moving the raster to the southwest corner, it is easier to re-snap it.
1.3.3. Two-point snapping with scaling
The binding is done by sequentially specifying a pair of points on the raster and the points to which the specified points should move after the transformation (from where to where, from where to where). The transformation is carried out by parallel movement of the entire raster while changing its scale. The image is snapped using the first pair of specified points. The second pair of points is specified to calculate the new scale of the raster image. Therefore, if the raster has unequal vertical and horizontal scale values (the raster is elongated or compressed due to deformation of the source material or an error in the scanning device), the second point will take its theoretical position with some error. To eliminate the error, you should use one of the methods for transforming a raster image (application task "Transforming raster data").
1.3.4. Rotate without scaling
The binding is done by sequentially specifying a pair of points on the raster and the points to which the specified points should move after the transformation (from where to where, from where to where). The transformation is carried out by parallel movement of the entire raster with a change in its orientation in space. The rotation is carried out around the first specified point. The image is snapped using the first pair of specified points. The second pair of points is specified to calculate the image rotation angle. Therefore, if the raster has unequal vertical and horizontal scale values (the raster is elongated or compressed due to deformation of the source material or an error in the scanning device), the second point will take its theoretical position with some error. To eliminate the error, you should use one of the methods for transforming a raster image (application task "Transforming raster data").
When loading raster maps into the database, a raster map work area can be created. To create a raster region, it is necessary to sequentially load into the system each raster image forming this region and orient it relative to unified system coordinates
The combination of raster and vector maps for the same or adjacent territories allows you to quickly create and update work areas, while maintaining the ability to solve applied problems for which some types of map objects must have a vector representation.
Often we have a paper map of an area and want to add this map to our GIS project. Let's look at how to create a georeferenced image from a scanned or photographed map using the example of the map of the Kvitucha Gora reserve.
In the example above, everything is done in QGIS. During the work the following modules will be used: Raster binding, QuickMapServices, GeoSearch. These plugins need to be installed and activated; you can read more about installing modules. The QuickMapServices and GeoSearch modules require an Internet connection to operate.
The next step is to find base map area of interest. To do this, having carefully examined the scanned map, we find on it the name of the settlement - “Milcha village”.
Knowing the name of the village, we can find it using one of the modules “GeoSearch”, “osmSearch” or “OSM place search”.
After scaling the map to the place of interest, we proceed directly to linking the map. To georeference raster images, QGIS has a built-in module “Raster Referencing” (Georeferencer). The module is launched from the menu section “Raster” - “Raster binding”.
The Georeferencer module opens in a new window.
Using the “Open raster” button or a key combination
An image will appear at the top of the window; at the bottom there is a table describing the anchor points.
Next, you need to select points on the base map and the image to which the image will be georeferenced. Usually these are intersections and turns of roads, bridges and other objects that are clearly visible on the base map and the linked image.
We increase the extent of the base map to the first anchor point. We also enlarge the image being anchored to the selected anchor point. Having approached the anchor point in the module window, click the “Add point” button and click the mouse pointer on the selected point. After this, a form for entering coordinates opens. Coordinates can be entered either through input fields or captured from the map. If we have coordinates of points, for example, obtained using a GPS navigator, we can enter them in the appropriate fields. To obtain coordinates from the base map, click the “From Map” button.
After clicking the “From Map” button, the main QGIS window automatically opens. In it, the mouse cursor looks like a white cross. Select an anchor point on the base map and click left button mice.
After clicking, we automatically return to the raster binding module window. The coordinate values of the point appear in the input form. The filled values have the project's coordinate system with the base map.
After clicking, the point is added to the table with a description of the anchor points. This way we add as many anchor points as possible. It is advisable to place the points evenly across the linked image. The more distorted the source image is, the more anchor points are required. The minimum number of anchor points is 3.
Next, set the transformation parameters. To do this, click the gear on the toolbar. In the window that opens, set the following required values: transformation type, interpolation method, target coordinate system, target raster. The remaining parameters are optional and can be left with default values.
The quality of the snap depends on the number of snap points and the choice of transformation method. You can read more about transformation methods.
One of the key points is to correctly specify the target coordinate system. If you entered coordinates obtained using a GPS navigator, then indicate the coordinate system specified in the GPS navigator settings, most often this is WGS 84 (EPSG:4326). If we took the coordinates from the map, then we indicate the coordinate system of the working project. In our case, this is WGS 84 / Pseudo Mercator (EPSG:3857) which is “native” for such map services as OpenStreetMap, ArcGIS Online and many others.
Having set the transformation parameters, we start the binding process by clicking the green triangle on the toolbar or selecting the appropriate item in the “File” menu. As a result of raster binding, a file in GeoTIFF format will be obtained.
If in the transformation parameters window you checked the “Open QGIS result” option, then after the binding process is completed, the resulting layer will be added to the working project on top of the base map.
An important nuance is that as a result of the module’s operation, the resulting raster has the coordinate system specified in the transformation parameters, but it does not contain information about exactly what projection of the raster it is. For this reason, it may be present in the list of layers, but not displayed on the map. In this case, you need to go to the “layer properties” and specify the desired coordinate system manually.
Once you have explicitly specified the correct coordinate system, the image will be positioned in the correct location.
By adjusting the transparency, we can hide the black fields along the edges of the linked image that resulted from the transformation.
We can also check the correctness of the binding by specifying the layer transparency at 50%.