geotif referencing of rotated image- without black box

3 views (last 30 days)
Please can somebody help me. I am trying to make a mosaic of georeferenced images whihc have been rotated dependent on the heading from which they were taken. I have managed to use imrotate and geotiffwrite to create the file- however this has a black boarder surrounding the image which prevent mosaicking. Does anybody know of a way to remove this black boarder? I was hoping to assign co-ordinates to each corner of the image by editing geotiffinfo cornercoordinates- preventing the need for the border but i cannot get the changes to save to the picture. I have also tried adding transparency to the image but this creates a white border and so does not remove my problem please any help would be wonderful. thank you

Answers (1)

Walter Roberson
Walter Roberson on 16 Oct 2012
No. MATLAB does not support non-rectangular arrays such as would be needed to store an image rotated at angles (that are not multiples of 90 degrees). Something has to go into the empty space. You can choose the constant that will go in, but you cannot make it "not be there"
  1 Comment
Kirsty
Kirsty on 16 Oct 2012
thank you but i dont think this is a very helpful answer, perhaps you missunderstood what i was asking so i will try again. i know matlab can only work with rectangular array which is why im trying to find a way to change the georeference information held via geotifinfo to reassign the corner co-ordinates. I am able to change them but i then need to be able to re-write the geotif with the new corner co-ordinates the image would have after rotating but maintinain the original file thus no border would be present but the image would be rotated when placed on a map. alternatively is there a way to make the zeros of the black border transparent?
thank you

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!