Filter löschen
Filter löschen

use comments from imwrite for labeling of images using imagedatastore

1 Ansicht (letzte 30 Tage)
HW
HW am 2 Feb. 2018
Beantwortet: Walter Roberson am 2 Feb. 2018
I use the foldernames option for 'LabelSource' in imageDatastore for labeling images. Because I am writing images from workspace variables, it would be convenient (and save time) to not have to place the images in a folder and then pull the image labels from a given folder, but rather from the comment property of jpeg files, which can be created when you use imwrite. (Of course, it would be ideal to be able to bypass the writing of an image before using imageDataStore, but that does not seem possible.)
Is it possible to label images from their comments, when using imageDatastore?

Antworten (1)

Walter Roberson
Walter Roberson am 2 Feb. 2018
No, but you can pass a Labels property to the imageDataStore call:
"File labels, specified as a vector or cell array of label names, with one name for each file in the datastore. The order of the labels in the array corresponds to the order of the associated files in the datastore."

Kategorien

Mehr zu Get Started with Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by