I have written a code and i’m pretty much stuck.
In the following code, i have split the complete image into a 3*3 block.
Each of the child (1-8) you can see, say i alter them in that child(1-8) array only.
Is there a method to combine these array (mother & child 1-8) to get the complete image back with the alteration that i’ve already made
pd_x=imread(name_doc);
[pd_m,pd_n]=size(pd_x);
di_m=pd_m;
di_n=pd_n;
pd_rv=ceil(pd_m/3);
pd_cv=ceil(pd_n/3);
mother1=pd_x(1:pd_rv,1:pd_cv);
child1=pd_x(1:pd_rv,pd_cv:(pd_cv+pd_cv));
child2=pd_x(1:pd_rv,(pd_cv+pd_cv):pd_n);
child3=pd_x(pd_rv:(pd_rv+pd_rv),1:pd_cv);
child4=pd_x(pd_rv:(pd_rv+pd_rv),pd_cv:(pd_cv+pd_cv));
child5=pd_x(pd_rv:(pd_rv+pd_rv),(pd_cv+pd_cv):pd_n);
child6=pd_x((pd_rv+pd_rv):pd_m,1:pd_cv);
child7=pd_x((pd_rv+pd_rv):pd_m,pd_cv:(pd_cv+pd_cv));
child8=pd_x((pd_rv+pd_rv):pd_m,(pd_cv+pd_cv):pd_n);
The syntax for concatenation is the following:
Taken from http://www.mathworks.com/help/techdoc/math/f1-84864.html
I’ve also made a basic example, defining first v,v2 and v3:
I do the following concatenation, the result will be…
Hope it helps you understand how it works!!