How to implement single channel image input using MATLAB Deep Network Designer
5 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Srikar Gooty
on 2 May 2022
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'.
0 Comments
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!