Im currently working on an individual mini project for my univeristy. My assignment is to create a program that converts an RGB image to an HSI image.
So i believe that what i have to do is:
-Load a color image into my program
-Read the RGB values
-Somehow convert them to HSI
I have already loaded the picture into my program using this code:
x = (ofGetWidth() - testImg.getWidth()) / 2;
y = (ofGetHeight() - testImg.getHeight()) / 2;
colorImg.setFromPixels(testImg.getPixels(), testImg.getWidth(), testImg.getHeight());
grayImg = colorImg;
And this is how i get it to be in color:
However i simply cannot figure out how to read the RGB values. Maybe if i use the getpixels function, but i simply cannot figure out how to implement it properly. Sorry if i sound like a total n00b, but the simple fact is, i am. Programming is not one of my strong points, but passing the mini project is required in order to even participate in the exams next january, so it is quite important for me.