how to convert a single grayscale image into the color in a data tore i have mixed color of images in the datastore both black and white and color how?
2 次查看(过去 30 天)
显示 更早的评论
importing the alexnet framework
net = alexnet
ly = net.Layers
inlayer = ly(1)
insz = inlayer.InputSize
creating the out layer
outlayer=ly(end)
creating the data store......
store = imageDatastore("images/",'FileExtensions',{'.jpg','.jpeg'})
Extracting the files.........
fnames = store.Files
REad an image
img = readimage(store,7)
augmented image data store
auds = augmentedImageDatastore([227 227],store)
classifying the images..
preds = classify(net,auds)
Display images in store what you are imported
montage(store)
converting the gray scale images to the color 3d images
auds = augmentedImageDatastore([227 227],store,'ColorPreprocessning','gray2rgb')
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning for Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!