Hi all, I was having a tutorial for image processing. The problem is I'm so stuck with the questions. Well, maybe it is so easy peasy for some of you. I'm such a newbie on this field. the tutorial question: an example: sensorData[0] represents cell [0,0]; then sensorData[0] = 50;//red 1)if sensorData[0] is for cell[0,0], then what is the corresponding sensorData array index for the following: a) cell[12,25] b)cell[25,25] c)cell[5,5] 2) whats the general equaltion for mapping array index for sensorData array with cell[..,..] array pls guys..pls..I'm so stuck..
i think what you need is a multi-level array for your data, it would be easier to map it.. example: sensorData = array(); sensorData[0] = array(); sensorData[0][0] = 50; sensorData[0][1] = 100; sensorData[0][2] = 150; sensorData[1] = array(); sensorData[1][0] = 200; sensorData[1][1] = 250; sensorData[1][2] = 300; sensorData[2] = array(); sensorData[2][0] = 350; sensorData[2][1] = 400; sensorData[2][2] = 450; // retrieving data red = sensorData[0][0]; im not sure on how you want it to work, but thats what i understand based on you questions.. note: if your using php, just put a $ before the variable name
hi..tq so much for your answer..But I'm still confuse with ---2) whats the general equaltion for mapping array index for sensorData array with? could you give me some links that will help me on this matter?
You're mapping a 1D array to 2D image representation correct? I'd consider re-factoring that to use nested loops, because images are just naturally 2D. n = width * x + y; Where n is the linear position, and x,y are your cells.
Hi, im a liittle confused with your sample code, if you want more info, you can see this c# image processing app, i used it several times this month, it is helpful.