I would need assistance from a freelance processing expert for a project I am doing. The mission is to read an image, convert it to some kind of mosaic and than export data for the different sectors detected into a data file. I am afraid that with my learning curve I will not make it in time for the project, but I really want to learn processing for other personal projects.
Does anyone want to assist me in this? I will of course pay for the work done!! If you feel that you just want to make the program, that is an option as well.
I have this code up to now, but much of it is pseudo code and possibly I am doing this completely wrong. I am now stuck in the part where I have to read a 4 on 4 zone of the image and put it in a 16 pixel array.
Thanks for answering!
Tim
PImage img;
int bigSector = 4;
int mediumSector = 2;
int smallSector = 1;
int updown = 0;
int leftright = 0;
int zoom = 1;
int r=0;
int g=0;
int b=0;
void setup() {
size(960, 1240);
smooth();
img = loadImage("source.png");
noStroke();
}
void draw() {
scale(zoom);
translate(leftright, updown);
image(img,0,0);
getDataFromImage(); //translate image color info to data file
}
void getDataFromImage()
{
img.loadPixels();
int sectorX=1; // the first part of the sectorname which is sectorX_sectorY -> 1_1 or 3_6
int x = 0;
while (x<img.width); // to be delayed in every step otherwise the program crashes
{
int y = 0;
int sectorY = 1 // the second part of the sectorname which is sectorX_sectorY -> 1_1 or 3_6
while (y<img.height); // to be delayed in every step otherwise the program crashes
I would need to write a program that loads pixels of an image for the first 12 on 12 pixels zone of that image , read color values and do some conditional calculations on that part and then go to the next 12 on 12 part of the image and on and on.
Is there a way to do this? I guess it is impossible to give a width and height of a sector in loadpixels since there are no variables for that and one can only load the full image? Does anyone maybe know if there is a library that has a function for that?
I al trying to divide an image into sectors in order to gather color info per sector and recalculate the pixels per sector afterwards. For that i created a function createSectors that has a bug somewhere, since when I added it nothing happens anymore at runtime. Even the image is not displayed anymore.