In the main program how do I make the nested loop. For examaple I assign Trow=128 and Tcol=128. Here Trow and Tcol are the total row and column. 1. I need to here scan through Trow * Tcol. 2. And take each block and perform the above function. 3. What will be the values for row and col in the above code? 4. does m[j][i] represent the original matrix? Thanks
Harish Makaram
Posts
-
Image Matrix -
Image MatrixOk ... I will try again. I have a matrix of size 128x128. I want to divide this matrix into groups of 4x4 that means the resultant is a matrix of 32x32. The next step is to take an average of this 4x4 matrix, and have the same value for all matrix elements. The resultant will be something like this a b c d e f g h M1=i j k l m n o p M1 is the given matrix. The new matrix M2 is given with the element value q is given by q = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p/16 q q q q q q q q M2=q q q q q q q q And in the next step I want to subtract M2-M1. Would be great if you can help me with a code snippet. Thanks
-
Image MatrixHere is what I want to do. I have an image which I converted from RGB to Y component. Now I want to group the pixels into a 4x4 block. And then take an average for each block. And then subtract this with the original 4x4 block.
-
Image MatrixI have written a code which takes the data out of the Matrix for an image and converts from RGB to Y component. My next step would be to split this matrix into 4x4 blocks and perform some calculations. After this, I want to take the resultant matrices and do some computations with the original Matrix. I am confused with the loops and how to go about creating the loops. I will be very glad if someone can help me with a code snippet. Thanks a lot. Sharp