Arcengine Image Registration

Source: Internet
Author: User

Image Registration mainly includes the following aspects:
1. Open the image
2. Registration
3. Image Storage/storage
1. The code for opening an image has been written before.
2. Registration
The igeoreference interface is used for registration.
In addition, activeview is used for Coordinate Transformation to convert the mouse clicking position in mapcontrol
Coordinates of the MAP and the image.
The following describes the igeoreference interface.
First, rasterlayer implements this interface.
Cangeoref checks whether the layer can be registered
Pointstransform converts the cursor position to the relative coordinates of the raster file.
Rectify saves the corrected result as a new grid file, which is equivalent to saving
The world file and the grid file are saved in the same directory.
The Reset is canceled and corrected, but the operations before register cannot be restored.

The most important thing is the following three
Shift Correction Means translation.
Twopointsadjust two-point registration must be scaled.
Warp three or more Registration

Note:

1. Each register is a symbolic stage
During each registration, all the configuration on-time data since the last register must be used.
For example:
First, register
Then 1. A little translation is used.
2. Next I accept another point. At this point, we need to use two-point registration.
3. Next, we accept another point. At this point, we need to use three-point registration.
2. Registration generally has an additional feature
It allows users to save each registration process and provide the accuracy of each registration process. This should be supplemented by yourself.
3. warehouse receiving/pyramid
Code directly:

  1. Irasterprops props = (irasterprops) This. prasterlayer. Raster;
  2. M_rasenv = props. extent;
  3. Ibasicrastersdeconnection pbasic = new basicrastersdeloader ();
  4. // Provide connection information
  5. Pbasic. servername = & quot; service period name & quot ;;
  6. Pbasic. instance = & quot; port number & quot ;;
  7. Pbasic. Username = & quot; username & quot ;;
  8. Pbasic. Password = & quot; password & quot ;;
  9. // Provide an image
  10. Pbasic. Raster = This. prasterlayer. Raster;
  11. // Name
  12. Pbasic. sderastername = rasternameindb;
  13. Irastersdeserveroperation pro = (irastersdeserveroperation) pbasic;
  14. // Import data
  15. Try
  16. {
  17. Pro. Create ();
  18. Pro. computestatistics ();
  19. }
  20. Catch (exception ex)
  21. {
  22. System. Windows. Forms. MessageBox. Show (& quot; image data import failed! & Quot; + ex. Message );
  23. Return;
  24. }
  25. // Create a pyramid
  26. Irastersdestorage2 PRS = (irastersdestorage2) Pro;
  27. PRS. pyramidoption = esrirastersdepyramidoptenum. esrirastersdepyramidbuildskipfirstlevel;
  28. PRS. pyramidresampletype = rstresamplingtypes. rsp_bilinearinterpolation;
  29. Pro. buildpyramids ();

Copy code

This image is now in the database.

Note:
Generally, you need to create an original data table about the image. It is used to record the images that belong to you. There is also a problem of name conversion, because Chinese names are not allowed.

 

From: http://www.sharpgis.com/forum.php? MoD = viewthread & tid = 220 & page = 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.