How can I load multiband satellite .TIF image (consisting of 4 bands) in image labeler for labeling the pixel?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I tried loading the TIF image, I think it got loaded but I cannot view the image in the display. Please provide a solution.
Thank you.
0 commentaires
Réponses (1)
Roshni Garnayak
le 11 Sep 2019
Try loading another small (few MB) .TIF image and see if you are able to view it. In case you can’t then reinstall the Image Labeler. In case you can view it then here are two suggested options for working with large mulitband images. Both involve loading only a portion of the image into the MATLAB workspace at a time, but each has advantages and disadvantages in terms of computation speed and hard drive space:
1) Operate on the image using subsets of bands
If you do not need all of the bands at once to perform your operations, you can load only a subset of the bands into the workspace at a time. To do this use the "multibandread" function but specify that you only want a subset of the bands in the input. This would work if many of the bands are irrelevant to your analysis or if the types of operations you are performing allow you to work on the data one subset at a time.
For an example of only reading certain bands with the "multibandread" function, go to this link:
Here the "multibandread" function only read bands 4,3, and 2; as specified in the input "{'Band','Direct',[4 3 2]}":
CIR = multibandread('paris.lan', [512, 512, 7], 'uint8=>uint8', 128, 'bil', 'ieee-le', {'Band','Direct',[4 3 2]});
For more information on the "multibandread" function, refer to the documentation:
2) Split the image into multiple files and use a datastore object
This option is similar to option 1, but use a "datastore" object to deal with the large file. To do this you will first have to read each band of the file one-by-one, using a method similar to that in option 1, then save each band as a grey-scale image somewhere in memory. Then you can load this collection of images into an "imagedatastore" or "datastore" object which can make performing certain operations easier and may be faster due to the prepossessed splitting of the image into bands. This method will be especially faster than option 1 if the "multibandread" function takes a significant amount of time and you want to operate on the image more than once. Note that doing this will take up additional hard drive space nearly equal that of the original file, but this may be a good trade-off for increase in speed.
See the links below for more details:
Datastore documentation:
ImageDatastore documentation:
Example of analyzing a collection of images with datastores:
Once you split the original image into multiple images you can load them onto Image Labeler and do the necessary processing.
1 commentaire
Muhammad Ammar Tanweer
le 23 Sep 2020
Sir how can I get karachi.lan image please mention the link or path I have all band grey scale images of city
?
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!