How can I input two images into neural network?

In my project, the input to the Neural net. should be two images, one 256*256 the other 64*64.
p={ image1 image2} net=train(net, p, output}
note that the two images should be the same size. so what is the best way to inter these matrices?
is it to unroll these matrices into one big column ( then the number of neurons will be 69632)?! or, segment every picture into a number of blocks x*x pixels, then the unroll this block , then the neural net will treat every block alone?!
What is the data structure will be?
  • " Concurrent Inputsin a Static Network ”or
  • " Sequential Inputs in a Dynamic Network ”or
  • " * Concurrent Inputs in a Dynamic Network "
  • "Batch" or
  • "Sequential" ?
thank you in advance

 Accepted Answer

Features should be extracted from each image. The features should be assembled into a vector. The type of net should be static concurrent.
Thank you for formally accepting my answer
Greg

1 Comment

thank you for your reply my work is in Steganography,
I wrote this code input (Rs_1) represent the first block in secret image the others represent blocks in secret image =16 bock
output should be the same as cover image blocks = 16 block
p= [Rs_1 Rc_1 Rc_2 Rc_3 Rc_4 Rc_5 Rc_6 Rc_7 Rc_8 Rc_9 Rc_10 Rc_11 Rc_12 Rc_13 Rc_14 Rc_15 Rc_1 ];
t= [Rc_1 Rc_2 Rc_3 Rc_4 Rc_5 Rc_6 Rc_7 Rc_8 Rc_9 Rc_10 Rc_11 Rc_12 Rc_13 Rc_14 Rc_15 Rc_16 ];
% Train ANN net = feedforwardnet(17,'trainrp'); net.trainParam.epochs = 100; net.trainParam.show = 10; net.trainParam.goal = 0.001; net.performFcn='msereg'; net.performParam.ratio=0.5; net.divideParam.valRatio=0; net.trainParam.min_grad=0;
% Train ANN net=train(net,p, t);
a=net(p)
when I run this code, error declared that number of input and output should be the same
any help please

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 27 Nov 2013

Commented:

on 28 Nov 2013

Community Treasure Hunt

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

Start Hunting!