I have 3 images E1,E2,E3 of equal size 256*256*3. Now by some any arbitrary rule, i want to create a jig saw puzzle which should be a reversible operation. The resultant image E would then be of unequal size,preferably. The question is explained with a small example to show the objective for simplicity: How to tackle the unequal sized of the resultant matrix E(image format) and how to achieve this? Please help Example : size(E1)=size(E2)=3*3
E1=( 1 2 3
4 5 6
7 8 9 )
E2 = ( a b c
d e f
g h i)
E = ( 1 2 3 a b c
4 5 6 d e f
7 8 9 g h i)
[r c]=size(E); But the scheme for arrangement should be such that r/c = number of matrices involved in the operation. This however would apply for even dimensioned开发者_如何学Go matrix.
So, the same operation is desired for RGB image.
Modified Question : In the above case, if E=[E1;E2]
then how is it possible to extract/get back E1 and E2 from E?
I do not understand what you are doing, but you can accomplish what you have in the example easily using reshape
:
E1_reshaped = reshape(e1, 1, []);
E2_reshaped = reshape(e2, 1, []);
E = [E1_reshaped; E2_reshaped];
精彩评论