How to implement single channel image input using MATLAB Deep Network Designer

2 次查看(过去 30 天)
I am currently using the MATLAB Deep Network Designer.
My image has 3 channels (RGB) and i use the Image Input Layer to input my image.
However, instead of applying subsequent convolution layers on the entire image, i want to apply convolution layers to the individual channels, meaning first split the image into R, G and B channels, then apply the convolution layers on the respective single channel, for instance, apply convolution layers on channel R only.
Need some advise on how to implement this either using the Deep Network Designer or Matlab code.
Thank you.

回答(1 个)

Srikar Gooty
Srikar Gooty 2022-5-2
The individual channels can be accessed as follows:
a1 = a(:,:,1) % a is the variable which has the image matrix.
Convolution layer has to be applied to 'a1' instead of 'a'.

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by