Matlab Neural Network Sim function configuration
1 view (last 30 days)
Show older comments
I want to model the sea surface Chlorophyll (Chl) concentration using satellite imagery. For this purpose I obtained satellite images and the ground measured Chl data for the same dates. The satellite data represent the satellite measured reflectance from water surface in four different wavelengths. To develop a relationship between the satellite measured reflectance and Chl-a, Neural Network (NN) technique is used. A NN is developed which contains 1 input layer with 4 neurons (each neuron represents the reflectance from each wavelengths), 1 hidden layer with 3 neurons and 1 output layer with 1 neuron (representing estimated Chl-a concentration). After training the network several times, the NN was tested for its performance by Simulating (Sim NET) some independent data and results seemed to be satisfactory. For a simple matrix (X) having 4 inputs (each representing reflectance from one of the 4 wavelengths) corresponding to 2 samples the simulation function can be written as given in Equation 1 which yield a single output Y for each sample.
Sim (net, X) --------- Equation (1)
But, how I can write a similar "Simulate" function for a .tif image which has four layers each representing the reflectance from a different wavelength. Image dimensions are 129x153x4, means the image has 4 layers (wavelengths) in which each layer has 129 rows and 153 columns. In each layer, the first element of row 1 and column 1 represents the corresponding reflectance value from the first pixel. The Sim function should run on each pixel of the image. For input, the Sim function should take the value of 1st pixel from 1st layer as Input1, 1st pixel from 2nd layer as Input2, 1st pixel from 3rd layer as Input3, and 1st pixel from 4th layer as Input4. And this process should run on all the pixels.
0 Comments
Accepted Answer
Greg Heath
on 19 Aug 2014
You have to convert the A3D(129x153x4) into A2D(4x(129*153))
Currently, I do not know how to do this. I tried using the function permute on A = rand(5,6,4) to obtain B(4,30) but was unsuccessful.
I suggest you solve this easier problem first.
Hope tis helps.
Greg
More Answers (1)
Greg Heath
on 19 Aug 2014
If size(L1) = [ 129 153 ] and similarly for L2, L3 and L4:
input = [ L1(:)' ; L2(:)' ; L3(:)' ; L4(:)' ];
output = net(input); % or the obsolete output = sim(net,input);
3 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!