Matlab Neural Network Sim function configuration

조회 수: 7 (최근 30일)
Majid Nazeer
Majid Nazeer 2014년 8월 19일
댓글: Greg Heath 2014년 8월 20일
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.

채택된 답변

Greg Heath
Greg Heath 2014년 8월 19일
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
  댓글 수: 2
Majid Nazeer
Majid Nazeer 2014년 8월 19일
Thanks Greg,
I can separate each layer its not a problem. After separation I have four layers each having dimension 129x453, representing one of the four wavelengths. Can you help me, how can I configure the "Sim NET" function for these layers as described in the above question?
Thanks
Greg Heath
Greg Heath 2014년 8월 19일
Typo: 129x153

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Greg Heath
Greg Heath 2014년 8월 19일
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
Majid Nazeer
Majid Nazeer 2014년 8월 20일
Dear Greg, Can I save the output in a .tif file which should have same dimensions as the input file had i.e. 129x153?
Greg Heath
Greg Heath 2014년 8월 20일
Yes
help reshape
doc reshape
type reshape
will get you started

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by