Transformation of geographical coordinates of remote sensing images in MATLAB

Source: Internet
Author: User

In MATLAB for image processing, the general use of the image local coordinates, in the upper left corner (at the beginning). When processing is complete, if you want to display the results in a remote sensing image with geographic coordinates, or if you need to output a SHP file, you need to involve conversion of local coordinates and geographic coordinates, and we can use the Pix2map function to implement this function.

Clc;clear;close All; [pic, R]= Geotiffread ('boston.tif'); %read the TIF image figure (1), Imshow (pic);
% pic is a local image, the following local image Operation Gray=rgb2gray (pic); BW=IM2BW (Gray,0.1); %threshold Split BW=1-BW;BW1= Bwareaopen (BW,500000); %Delete an area less than 500000 bw2=imfill (BW1,'Holes'); %fill hole figure (2), Imshow (BW2); BW3=bwboundaries (BW2); %Get edge Contour Data=bw3{1,1}; % get Contour line coordinates, one nmatrix of 2, which is the local image coordinate [lonx,laty]=pix2map (R,data (:,1), data (:,2)); %converts local image coordinates to geographic coordinates figure (3), Axis off;mapshow ('boston.tif'); %displays a remote sensing image with geographical coordinates mapshow (Lonx,laty,'Color','R'); % display outlines on remote sensing imagery

To convert the geographic coordinates of remote sensing imagery in MATLAB

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.